Commit 468bc50
committed
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 <[email protected]>1 parent e49ec15 commit 468bc50
1 file changed
+30
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
322 | 323 | | |
323 | 324 | | |
324 | 325 | | |
325 | | - | |
326 | | - | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
327 | 329 | | |
328 | 330 | | |
329 | 331 | | |
330 | 332 | | |
331 | 333 | | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
332 | 337 | | |
333 | 338 | | |
334 | 339 | | |
335 | | - | |
| 340 | + | |
336 | 341 | | |
337 | 342 | | |
338 | 343 | | |
339 | | - | |
| 344 | + | |
340 | 345 | | |
341 | 346 | | |
342 | 347 | | |
343 | | - | |
| 348 | + | |
344 | 349 | | |
345 | | - | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
346 | 362 | | |
347 | 363 | | |
348 | 364 | | |
| |||
431 | 447 | | |
432 | 448 | | |
433 | 449 | | |
| 450 | + | |
| 451 | + | |
434 | 452 | | |
| 453 | + | |
| 454 | + | |
435 | 455 | | |
436 | 456 | | |
437 | 457 | | |
| |||
443 | 463 | | |
444 | 464 | | |
445 | 465 | | |
446 | | - | |
447 | | - | |
448 | | - | |
| 466 | + | |
| 467 | + | |
449 | 468 | | |
450 | | - | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | | - | |
455 | | - | |
456 | | - | |
457 | | - | |
| 469 | + | |
| 470 | + | |
458 | 471 | | |
459 | 472 | | |
460 | 473 | | |
| |||
0 commit comments