tracing: Use trace_call__FOO() for tracepoints behind trace_FOO_enabled()
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest9 patches 2 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/9 | net: Use trace_call__##name() at guarded tracepoint call sitesnet/ net/ net/ +3 more | +6 | 0 replies | |
| 2/9 | accel/habanalabs: Use trace_call__##name() at guarded tracepoint call sitesdrivers/ drivers/ drivers/ | +11 | 0 replies | |
| 3/9 | devfreq: Use trace_call__##name() at guarded tracepoint call sitesdrivers/ | +1 | 2 replies | |
| 4/9 | dma-buf: Use trace_call__##name() at guarded tracepoint call sitesdrivers/ | +1 | 0 replies | |
| 5/9 | drm: Use trace_call__##name() at guarded tracepoint call sitesdrivers/ drivers/ drivers/ | +6 | 0 replies | |
| 6/9 | scsi: ufs: Use trace_call__##name() at guarded tracepoint call sitesdrivers/ | +16 | 0 replies | |
| 7/9 | net: devlink: Use trace_call__##name() at guarded tracepoint call sitesnet/ | +1 | 0 replies | |
| 8/9 | kernel: time, trace: Use trace_call__##name() at guarded tracepoint call siteskernel/ kernel/ | +7 | 0 replies | |
| 9/9 | x86: msr: Use trace_call__##name() at guarded tracepoint call sitesarch/ | +3 | 0 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/9] tracing: Use trace_call__FOO() for tracepoints behind trace_FOO_enabled()
This is a rebase of patches Vineeth Pillai created back in May[1]. This series fixes the "double static_branch" that Peter Zijlstra complained about. When there's some extra work that needs to be done specifically for a tracepoint, that work should be behind a trace_FOO_enabled() "if" statement so that the work is only done when the tracepoint FOO is enabled. The issue that Peter complained about is that both the trace_FOO_enabled() and the trace_FOO() use a static branch which has the nop/jmp switch. There's no reason to have the trace_FOO() use that if it is behind a trace_FOO_enabled() as that test has already been checked.
Vineeth created a trace_call__FOO() which calls the tracepoint logic directly without doing the static_branch. This is to only be used when the tracepoint is called behind a trace_FOO_enabled() check. That code[2] has been upstream since 7.1. Vineeth also sent out changes to update all trace_FOO() callers behind a trace_FOO_enabled() to use the new API. But not all maintainers took it nor gave an ack.
This is a rebase of that work for the maintainers that did not ack nor take the patches. This is to give those maintainers another chance to do so. Maintainers may either take the patches or ACK them and I'll take it.
[1] https://lore.kernel.org/linux-trace-kernel/[email protected]/
[2] 677a3d82b6407 ("tracepoint: Add trace_call__##name() API")
Vineeth Pillai (9):
net: Use trace_call__##name() at guarded tracepoint call sites accel/habanalabs: Use trace_call__##name() at guarded tracepoint call sites
devfreq: Use trace_call__##name() at guarded tracepoint call sites
dma-buf: Use trace_call__##name() at guarded tracepoint call sites
drm: Use trace_call__##name() at guarded tracepoint call sites
scsi: ufs: Use trace_call__##name() at guarded tracepoint call sites
net: devlink: Use trace_call__##name() at guarded tracepoint call sites
kernel: time, trace: Use trace_call__##name() at guarded tracepoint call sites
x86: msr: Use trace_call__##name() at guarded tracepoint call sites
----
arch/x86/lib/msr.c | 6 +++--- drivers/accel/habanalabs/common/device.c | 9 +++++---- drivers/accel/habanalabs/common/mmu/mmu.c | 3 ++- drivers/accel/habanalabs/common/pci/pci.c | 6 ++++-- drivers/devfreq/devfreq.c | 2 +- drivers/dma-buf/dma-fence.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 ++-- drivers/gpu/drm/scheduler/sched_entity.c | 5 +++-- drivers/ufs/core/ufshcd.c | 31 ++++++++++++++++--------------- kernel/time/tick-sched.c | 12 ++++++------ kernel/trace/trace_benchmark.c | 2 +- net/core/dev.c | 2 +- net/core/xdp.c | 2 +- net/devlink/trap.c | 2 +- net/openvswitch/actions.c | 2 +- net/openvswitch/datapath.c | 2 +- net/sctp/outqueue.c | 2 +- net/tipc/node.c | 2 +- 19 files changed, 52 insertions(+), 46 deletions(-)