aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/syscall-counts-by-pid.py
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2020-11-04 16:12:45 +0100
committerDavid Sterba <dsterba@suse.com>2020-12-08 15:54:15 +0100
commitc7c01a4a2524b3f130c1821fbaf1677fe8394165 (patch)
treeacb487907df3c6732dfbfb5e397f1e7164f7ad5f /tools/perf/scripts/python/syscall-counts-by-pid.py
parenta0f6d924cada10eefa526ccfa1be7888f559d9d7 (diff)
btrfs: tree-checker: annotate all error branches as unlikely
The tree checker is called many times as it verifies metadata at read/write time. The checks follow a simple pattern: if (error_condition) { report_error(); return -EUCLEAN; } All the error reporting functions are annotated as __cold that is supposed to hint the compiler to move the statement block out of the hot path. This does not seem to happen that often. As the error condition is expected to be false almost always, we can annotate it with 'unlikely' as this satisfies one of the few use cases for the annotation. The expected outcome is a stronger hint to compiler to reorder the checks test jump to exit test jump to exit ... which can be observed in asm of eg. check_dir_item, btrfs_check_chunk_valid, check_root_item or check_leaf. There's a measurable run time improvement reported by Josef, the testing workload went from 655 MiB/s to 677 MiB/s, which is about +3%. There should be no functional changes but some of the conditions have been rewritten to produce more readable result, some lines are longer than 80, for the sake of readability. Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts-by-pid.py')
0 files changed, 0 insertions, 0 deletions