Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

btrfs: Use trace_call__##name() at guarded tracepoint call sites

Replace trace_foo() with the new trace_call__foo() at sites already
guarded by trace_foo_enabled(), avoiding a redundant
static_branch_unlikely() re-evaluation inside the tracepoint.
trace_call__foo() calls the tracepoint callbacks directly without
utilizing the static branch again.

Cc: Chris Mason <clm@fb.com>
Link: https://patch.msgid.link/20260323160052.17528-16-vineeth@bitbyteword.org
Suggested-by: Steven Rostedt <rostedt@goodmis.org>
Suggested-by: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Vineeth Pillai (Google) <vineeth@bitbyteword.org>
Assisted-by: Claude:claude-sonnet-4-6
Acked-by: David Sterba <dsterba@suse.com>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>

authored by

Vineeth Pillai (Google) and committed by
Steven Rostedt (Google)
d7447f2d 47f570fc

+4 -4
+2 -2
fs/btrfs/extent_map.c
··· 1318 1318 if (trace_btrfs_extent_map_shrinker_scan_enter_enabled()) { 1319 1319 s64 nr = percpu_counter_sum_positive(&fs_info->evictable_extent_maps); 1320 1320 1321 - trace_btrfs_extent_map_shrinker_scan_enter(fs_info, nr); 1321 + trace_call__btrfs_extent_map_shrinker_scan_enter(fs_info, nr); 1322 1322 } 1323 1323 1324 1324 while (ctx.scanned < ctx.nr_to_scan && !btrfs_fs_closing(fs_info)) { ··· 1358 1358 if (trace_btrfs_extent_map_shrinker_scan_exit_enabled()) { 1359 1359 s64 nr = percpu_counter_sum_positive(&fs_info->evictable_extent_maps); 1360 1360 1361 - trace_btrfs_extent_map_shrinker_scan_exit(fs_info, nr_dropped, nr); 1361 + trace_call__btrfs_extent_map_shrinker_scan_exit(fs_info, nr_dropped, nr); 1362 1362 } 1363 1363 1364 1364 atomic64_set(&fs_info->em_shrinker_nr_to_scan, 0);
+2 -2
fs/btrfs/raid56.c
··· 1743 1743 struct raid56_bio_trace_info trace_info = { 0 }; 1744 1744 1745 1745 bio_get_trace_info(rbio, bio, &trace_info); 1746 - trace_raid56_read(rbio, bio, &trace_info); 1746 + trace_call__raid56_read(rbio, bio, &trace_info); 1747 1747 } 1748 1748 submit_bio(bio); 1749 1749 } ··· 2428 2428 struct raid56_bio_trace_info trace_info = { 0 }; 2429 2429 2430 2430 bio_get_trace_info(rbio, bio, &trace_info); 2431 - trace_raid56_write(rbio, bio, &trace_info); 2431 + trace_call__raid56_write(rbio, bio, &trace_info); 2432 2432 } 2433 2433 submit_bio(bio); 2434 2434 }