[crac] RFR: Ignore open files in /var/lib/sss/mc [v2]
Radim Vansa
rvansa at openjdk.org
Mon Nov 6 07:56:17 UTC 2023
On Thu, 2 Nov 2023 16:02:52 GMT, Roman Marchenko <rmarchenko at openjdk.org> wrote:
>> Radim Vansa has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Use constexpr rather than macro
>
> src/hotspot/os/linux/crac_linux.cpp line 336:
>
>> 334: // or other functions in this family.
>> 335: #define SSS_NSS_MEMCACHE "/var/lib/sss/mc/"
>> 336: if (!strncmp(details, SSS_NSS_MEMCACHE, sizeof(SSS_NSS_MEMCACHE) - 1)) {
>
> I believe GCC can manage with `const char *` and `strlen` call in compile time here. `constexpr` could be added as well, but not necessary I guess.
Right; this is not the most perf-critical part but for the fun I've checked the assembly and since this is 16 bytes it is easily replaced with 2 64-bit constant comparisons.
Btw. for some reason the compiler emits warning for just `constexpr char *...`, I have to write `constexpr const char *...`.
-------------
PR Review Comment: https://git.openjdk.org/crac/pull/137#discussion_r1382890915
More information about the crac-dev
mailing list