HomeClusterLabs Projects

Refactor: libpacemaker: Filter out non-regular profile files
45fbc11c6d5fUnpublished

Unpublished Commit ยท Learn More

Not On Permanent Ref: This commit is not an ancestor of any permanent ref.
This commit no longer exists in the repository. It may have been part of a branch which was deleted.This commit has been deleted in the repository: it is no longer reachable from any branch, tag, or ref.

Description

Refactor: libpacemaker: Filter out non-regular profile files

profile_filter() previously did not check whether the file was a regular
file, because it didn't have access to the profiling directory path.
There is no user data argument. However, we can hack around this with a
global variable. This way, we don't end up with a "Timings" section of
the output if we're ultimately going to ignore all the files that passed
the scandir() filter.

glibc doesn't enforce PATH_MAX, so we shouldn't assume a path is less
than that. The overhead of crm_strdup_printf() calls is negligible
compared to profiling overhead and does not count toward profiling time.
https://www.gnu.org/software/libc/manual/html_node/Limits-for-Files.html

Signed-off-by: Reid Wahl <nrwahl@protonmail.com>

Details

Provenance
nrwahl2Authored on Mar 1 2025, 3:48 AM

Event Timeline

Commit No Longer Exists

This commit no longer exists in the repository.