tracing: Use trace_call__FOO() for tracepoints behind trace_FOO_enabled()
Subsystems (23)
cover 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(-)
PATCH 1/9 net: Use trace_call__##name() at guarded tracepoint call sites
From: Vineeth Pillai <[email protected]>
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.
Original v2 series:
https://lore.kernel.org/linux-trace-kernel/[email protected]/
Parts of the original v2 series have already been merged in mainline. This patch is being reposted as a follow-up cleanup for the remaining unmerged pieces.
--- net/core/dev.c | 2 +- net/core/xdp.c | 2 +- net/openvswitch/actions.c | 2 +- net/openvswitch/datapath.c | 2 +- net/sctp/outqueue.c | 2 +- net/tipc/node.c | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-)
net/core/dev.c +1 -1
@@ -6685,7 +6685,7 @@ void netif_receive_skb_list(struct list_head *head)return ;if (trace_netif_receive_skb_list_entry_enabled ()) {list_for_each_entry (skb, head, list) -trace_netif_receive_skb_list_entry (skb); +trace_call__netif_receive_skb_list_entry (skb); }netif_receive_skb_list_internal (head);trace_netif_receive_skb_list_exit (0 );
net/core/xdp.c +1 -1
@@ -362,7 +362,7 @@ int xdp_rxq_info_reg_mem_model(struct xdp_rxq_info *xdp_rxq,xsk_pool_set_rxq_info (allocator, xdp_rxq);if (trace_mem_connect_enabled () && xdp_alloc) -trace_mem_connect (xdp_alloc, xdp_rxq); +trace_call__mem_connect (xdp_alloc, xdp_rxq);return 0 ; }
net/openvswitch/actions.c +1 -1
@@ -1278,7 +1278,7 @@ static int do_execute_actions(struct datapath *dp, struct sk_buff *skb,int err =0 ;if (trace_ovs_do_execute_action_enabled ()) -trace_ovs_do_execute_action (dp, skb, key, a, rem); +trace_call__ovs_do_execute_action (dp, skb, key, a, rem);/* Actions that rightfully have to consume the skb should do it * and return directly.
net/openvswitch/datapath.c +1 -1
@@ -336,7 +336,7 @@ int ovs_dp_upcall(struct datapath *dp, struct sk_buff *skb,int err;if (trace_ovs_dp_upcall_enabled ()) -trace_ovs_dp_upcall (dp, skb, key, upcall_info); +trace_call__ovs_dp_upcall (dp, skb, key, upcall_info);if (upcall_info->portid ==0 ) { err = -ENOTCONN ;
net/sctp/outqueue.c +1 -1
@@ -1268,7 +1268,7 @@ int sctp_outq_sack(struct sctp_outq *q, struct sctp_chunk *chunk)/* SCTP path tracepoint for congestion control debugging. */ if (trace_sctp_probe_path_enabled ()) {list_for_each_entry (transport, transport_list, transports) -trace_sctp_probe_path (transport, asoc); +trace_call__sctp_probe_path (transport, asoc); } sack_ctsn =ntohl (sack->cum_tsn_ack);
net/tipc/node.c +1 -1
@@ -1953,7 +1953,7 @@ static bool tipc_node_check_state(struct tipc_node *n, struct sk_buff *skb,if (trace_tipc_node_check_state_enabled ()) {trace_tipc_skb_dump (skb, false,"skb for node state check" ); -trace_tipc_node_check_state (n, true," " ); +trace_call__tipc_node_check_state (n, true," " ); } l = n->links[bearer_id].link;if (!l)
Signature · 1 line
2.53.0
PATCH 2/9 accel/habanalabs: Use trace_call__##name() at guarded tracepoint call sites
In reply to Steven RostedtFrom: Vineeth Pillai <[email protected]>
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.
Original v2 series:
https://lore.kernel.org/linux-trace-kernel/[email protected]/
Parts of the original v2 series have already been merged in mainline. This patch is being reposted as a follow-up cleanup for the remaining unmerged pieces.
--- drivers/accel/habanalabs/common/device.c | 9 +++++---- drivers/accel/habanalabs/common/mmu/mmu.c | 3 ++- drivers/accel/habanalabs/common/pci/pci.c | 6 ++++-- 3 files changed, 11 insertions(+), 7 deletions(-)
drivers/accel/habanalabs/common/device.c +5 -4
@@ -132,8 +132,9 @@ static void *hl_dma_alloc_common(struct hl_device *hdev, size_t size, dma_addr_t }if (trace_habanalabs_dma_alloc_enabled () && !ZERO_OR_NULL_PTR (ptr)) -trace_habanalabs_dma_alloc (&(hdev)->pdev->dev, (u64 ) (uintptr_t ) ptr, *dma_handle, - size, caller); +trace_call__habanalabs_dma_alloc (&(hdev)->pdev->dev, + (u64 ) (uintptr_t ) ptr, + *dma_handle, size, caller);return ptr; }
@@ -2656,7 +2657,7 @@ inline u32 hl_rreg(struct hl_device *hdev, u32 reg)u32 val =readl (hdev->rmmio + reg);if (unlikely (trace_habanalabs_rreg32_enabled ())) -trace_habanalabs_rreg32 (&(hdev)->pdev->dev, reg, val); +trace_call__habanalabs_rreg32 (&(hdev)->pdev->dev, reg, val);return val; }
@@ -2674,7 +2675,7 @@ inline u32 hl_rreg(struct hl_device *hdev, u32 reg)inline void hl_wreg (struct hl_device *hdev,u32 reg,u32 val) {if (unlikely (trace_habanalabs_wreg32_enabled ())) -trace_habanalabs_wreg32 (&(hdev)->pdev->dev, reg, val); +trace_call__habanalabs_wreg32 (&(hdev)->pdev->dev, reg, val);writel (val, hdev->rmmio + reg); }
drivers/accel/habanalabs/common/mmu/mmu.c +2 -1
@@ -263,7 +263,8 @@ int hl_mmu_unmap_page(struct hl_ctx *ctx, u64 virt_addr, u32 page_size, bool flu mmu_funcs->flush (ctx);if (trace_habanalabs_mmu_unmap_enabled () && !rc) -trace_habanalabs_mmu_unmap (&hdev->pdev->dev, virt_addr,0 , page_size, flush_pte); +trace_call__habanalabs_mmu_unmap (&hdev->pdev->dev, virt_addr,0 , + page_size, flush_pte);return rc; }
drivers/accel/habanalabs/common/pci/pci.c +4 -2
@@ -123,7 +123,8 @@ int hl_pci_elbi_read(struct hl_device *hdev, u64 addr, u32 *data)pci_read_config_dword (pdev, mmPCI_CONFIG_ELBI_DATA, data);if (unlikely (trace_habanalabs_elbi_read_enabled ())) -trace_habanalabs_elbi_read (&hdev->pdev->dev, (u32 ) addr, val); +trace_call__habanalabs_elbi_read (&hdev->pdev->dev, + (u32 ) addr, val);return 0 ; }
@@ -186,7 +187,8 @@ static int hl_pci_elbi_write(struct hl_device *hdev, u64 addr, u32 data)if ((val &PCI_CONFIG_ELBI_STS_MASK ) ==PCI_CONFIG_ELBI_STS_DONE ) {if (unlikely (trace_habanalabs_elbi_write_enabled ())) -trace_habanalabs_elbi_write (&hdev->pdev->dev, (u32 ) addr, val); +trace_call__habanalabs_elbi_write (&hdev->pdev->dev, + (u32 ) addr, val);return 0 ; }
Signature · 1 line
2.53.0
PATCH 3/9 devfreq: Use trace_call__##name() at guarded tracepoint call sites
In reply to Steven RostedtFrom: Vineeth Pillai <[email protected]>
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.
Original v2 series:
https://lore.kernel.org/linux-trace-kernel/[email protected]/
Parts of the original v2 series have already been merged in mainline. This patch is being reposted as a follow-up cleanup for the remaining unmerged pieces.
--- drivers/devfreq/devfreq.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/devfreq/devfreq.c +1 -1
@@ -370,7 +370,7 @@ static int devfreq_set_target(struct devfreq *devfreq, unsigned long new_freq,* change order of between devfreq device and passive devfreq device. */ if (trace_devfreq_frequency_enabled () && new_freq != cur_freq) -trace_devfreq_frequency (devfreq, new_freq, cur_freq); +trace_call__devfreq_frequency (devfreq, new_freq, cur_freq); freqs.new = new_freq;devfreq_notify_transition (devfreq, &freqs,DEVFREQ_POSTCHANGE );
Signature · 1 line
2.53.0
PATCH 4/9 dma-buf: Use trace_call__##name() at guarded tracepoint call sites
In reply to Steven RostedtFrom: Vineeth Pillai <[email protected]>
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.
Original v2 series:
https://lore.kernel.org/linux-trace-kernel/[email protected]/
Parts of the original v2 series have already been merged in mainline. This patch is being reposted as a follow-up cleanup for the remaining unmerged pieces.
--- drivers/dma-buf/dma-fence.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/dma-buf/dma-fence.c +1 -1
@@ -554,7 +554,7 @@ dma_fence_wait_timeout(struct dma_fence *fence, bool intr, signed long timeout) }if (trace_dma_fence_wait_end_enabled ()) {rcu_read_lock (); -trace_dma_fence_wait_end (fence); +trace_call__dma_fence_wait_end (fence);rcu_read_unlock (); }return ret;
Signature · 1 line
2.53.0
PATCH 5/9 drm: Use trace_call__##name() at guarded tracepoint call sites
In reply to Steven RostedtFrom: Vineeth Pillai <[email protected]>
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.
Original v2 series:
https://lore.kernel.org/linux-trace-kernel/[email protected]/
Parts of the original v2 series have already been merged in mainline. This patch is being reposted as a follow-up cleanup for the remaining unmerged pieces.
--- 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 +++-- 3 files changed, 6 insertions(+), 5 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c +1 -1
@@ -1025,7 +1025,7 @@ static void trace_amdgpu_cs_ibs(struct amdgpu_cs_parser *p)struct amdgpu_job *job = p->jobs[i];for (j =0 ; j < job->num_ibs; ++j) -trace_amdgpu_cs (p, job, &job->ibs[j]); +trace_call__amdgpu_cs (p, job, &job->ibs[j]); } }
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +2 -2
@@ -1425,7 +1425,7 @@ int amdgpu_vm_bo_update(struct amdgpu_device *adev, struct amdgpu_bo_va *bo_va,if (trace_amdgpu_vm_bo_mapping_enabled ()) {list_for_each_entry (mapping, &bo_va->valids, list) -trace_amdgpu_vm_bo_mapping (mapping); +trace_call__amdgpu_vm_bo_mapping (mapping); } error_free:
@@ -2189,7 +2189,7 @@ void amdgpu_vm_bo_trace_cs(struct amdgpu_vm *vm, struct ww_acquire_ctx *ticket)continue ; } -trace_amdgpu_vm_bo_cs (mapping); +trace_call__amdgpu_vm_bo_cs (mapping); } }
drivers/gpu/drm/scheduler/sched_entity.c +3 -2
@@ -500,7 +500,8 @@ static bool drm_sched_entity_add_dependency_cb(struct drm_sched_entity *entity,if (trace_drm_sched_job_unschedulable_enabled () && !test_bit (DMA_FENCE_FLAG_SIGNALED_BIT , &entity->dependency->flags)) -trace_drm_sched_job_unschedulable (sched_job, entity->dependency); +trace_call__drm_sched_job_unschedulable (sched_job, + entity->dependency);if (!dma_fence_add_callback (entity->dependency, &entity->cb, drm_sched_entity_wakeup))
@@ -630,7 +631,7 @@ void drm_sched_entity_push_job(struct drm_sched_job *sched_job)unsigned long index;xa_for_each (&sched_job->dependencies, index, entry) -trace_drm_sched_job_add_dep (sched_job, entry); +trace_call__drm_sched_job_add_dep (sched_job, entry); }atomic_inc (entity->rq->sched->score);WRITE_ONCE (entity->last_user, current->group_leader);
Signature · 1 line
2.53.0
PATCH 6/9 scsi: ufs: Use trace_call__##name() at guarded tracepoint call sites
In reply to Steven RostedtFrom: Vineeth Pillai <[email protected]>
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.
Original v2 series:
https://lore.kernel.org/linux-trace-kernel/[email protected]/
Parts of the original v2 series have already been merged in mainline. This patch is being reposted as a follow-up cleanup for the remaining unmerged pieces.
--- drivers/ufs/core/ufshcd.c | 31 ++++++++++++++++--------------- 1 file changed, 16 insertions(+), 15 deletions(-)
drivers/ufs/core/ufshcd.c +16 -15
@@ -421,8 +421,8 @@ static void ufshcd_add_cmd_upiu_trace(struct ufs_hba *hba,else header = &lrb->ucd_rsp_ptr->header; -trace_ufshcd_upiu (hba, str_t, header, &rq->sc.cdb, -UFS_TSF_CDB ); +trace_call__ufshcd_upiu (hba, str_t, header, &rq->sc.cdb, +UFS_TSF_CDB ); } static void ufshcd_add_query_upiu_trace(struct ufs_hba *hba,
@@ -432,8 +432,8 @@ static void ufshcd_add_query_upiu_trace(struct ufs_hba *hba,if (!trace_ufshcd_upiu_enabled ())return ; -trace_ufshcd_upiu (hba, str_t, &rq_rsp->header, - &rq_rsp->qr,UFS_TSF_OSF ); +trace_call__ufshcd_upiu (hba, str_t, &rq_rsp->header, + &rq_rsp->qr,UFS_TSF_OSF ); } static void ufshcd_add_tm_upiu_trace(struct ufs_hba *hba, unsigned int tag,
@@ -445,15 +445,15 @@ static void ufshcd_add_tm_upiu_trace(struct ufs_hba *hba, unsigned int tag,return ;if (str_t ==UFS_TM_SEND ) -trace_ufshcd_upiu (hba, str_t, - &descp->upiu_req.req_header, - &descp->upiu_req.input_param1, -UFS_TSF_TM_INPUT ); +trace_call__ufshcd_upiu (hba, str_t, + &descp->upiu_req.req_header, + &descp->upiu_req.input_param1, +UFS_TSF_TM_INPUT );else -trace_ufshcd_upiu (hba, str_t, - &descp->upiu_rsp.rsp_header, - &descp->upiu_rsp.output_param1, -UFS_TSF_TM_OUTPUT ); +trace_call__ufshcd_upiu (hba, str_t, + &descp->upiu_rsp.rsp_header, + &descp->upiu_rsp.output_param1, +UFS_TSF_TM_OUTPUT ); } static void ufshcd_add_uic_command_trace(struct ufs_hba *hba,
@@ -477,7 +477,7 @@ static void ufshcd_add_uic_command_trace(struct ufs_hba *hba, arg3 =ufshcd_readl (hba,REG_UIC_COMMAND_ARG_3 ); } -trace_ufshcd_uic_command (hba, str_t, cmd, arg1, arg2, arg3); +trace_call__ufshcd_uic_command (hba, str_t, cmd, arg1, arg2, arg3); } static void ufshcd_add_command_trace(struct ufs_hba *hba, struct scsi_cmnd *cmd,
@@ -526,8 +526,9 @@ static void ufshcd_add_command_trace(struct ufs_hba *hba, struct scsi_cmnd *cmd, }else { doorbell =ufshcd_readl (hba,REG_UTP_TRANSFER_REQ_DOOR_BELL ); } -trace_ufshcd_command (cmd->device, hba, str_t, tag, doorbell, hwq_id, - transfer_len, intr, lba, opcode, group_id); +trace_call__ufshcd_command (cmd->device, hba, str_t, tag, doorbell, + hwq_id, transfer_len, intr, lba, opcode, + group_id); }static void ufshcd_print_clk_freqs (struct ufs_hba *hba)
Signature · 1 line
2.53.0
PATCH 7/9 net: devlink: Use trace_call__##name() at guarded tracepoint call sites
In reply to Steven RostedtFrom: Vineeth Pillai <[email protected]>
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.
Original v2 series:
https://lore.kernel.org/linux-trace-kernel/[email protected]/
Parts of the original v2 series have already been merged in mainline. This patch is being reposted as a follow-up cleanup for the remaining unmerged pieces.
--- net/devlink/trap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/devlink/trap.c +1 -1
@@ -1497,7 +1497,7 @@ void devlink_trap_report(struct devlink *devlink, struct sk_buff *skb,devlink_trap_report_metadata_set (&metadata, trap_item, in_devlink_port, fa_cookie); -trace_devlink_trap_report (devlink, skb, &metadata); +trace_call__devlink_trap_report (devlink, skb, &metadata); } }EXPORT_SYMBOL_GPL (devlink_trap_report);
Signature · 1 line
2.53.0
PATCH 8/9 kernel: time, trace: Use trace_call__##name() at guarded tracepoint call sites
In reply to Steven RostedtFrom: Vineeth Pillai <[email protected]>
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.
Original v2 series:
https://lore.kernel.org/linux-trace-kernel/[email protected]/
Parts of the original v2 series have already been merged in mainline. This patch is being reposted as a follow-up cleanup for the remaining unmerged pieces.
--- kernel/time/tick-sched.c | 12 ++++++------ kernel/trace/trace_benchmark.c | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-)
kernel/time/tick-sched.c +6 -6
@@ -346,32 +346,32 @@ static bool check_tick_dependency(atomic_t *dep)return !!val;if (val &TICK_DEP_MASK_POSIX_TIMER ) { -trace_tick_stop (0 ,TICK_DEP_MASK_POSIX_TIMER ); +trace_call__tick_stop (0 ,TICK_DEP_MASK_POSIX_TIMER );return true; }if (val &TICK_DEP_MASK_PERF_EVENTS ) { -trace_tick_stop (0 ,TICK_DEP_MASK_PERF_EVENTS ); +trace_call__tick_stop (0 ,TICK_DEP_MASK_PERF_EVENTS );return true; }if (val &TICK_DEP_MASK_SCHED ) { -trace_tick_stop (0 ,TICK_DEP_MASK_SCHED ); +trace_call__tick_stop (0 ,TICK_DEP_MASK_SCHED );return true; }if (val &TICK_DEP_MASK_CLOCK_UNSTABLE ) { -trace_tick_stop (0 ,TICK_DEP_MASK_CLOCK_UNSTABLE ); +trace_call__tick_stop (0 ,TICK_DEP_MASK_CLOCK_UNSTABLE );return true; }if (val &TICK_DEP_MASK_RCU ) { -trace_tick_stop (0 ,TICK_DEP_MASK_RCU ); +trace_call__tick_stop (0 ,TICK_DEP_MASK_RCU );return true; }if (val &TICK_DEP_MASK_RCU_EXP ) { -trace_tick_stop (0 ,TICK_DEP_MASK_RCU_EXP ); +trace_call__tick_stop (0 ,TICK_DEP_MASK_RCU_EXP );return true; }
kernel/trace/trace_benchmark.c +1 -1
@@ -51,7 +51,7 @@ static void trace_do_benchmark(void)local_irq_disable (); start =trace_clock_local (); -trace_benchmark_event (bm_str, bm_last); +trace_call__benchmark_event (bm_str, bm_last); stop =trace_clock_local ();local_irq_enable ();
Signature · 1 line
2.53.0
PATCH 9/9 x86: msr: Use trace_call__##name() at guarded tracepoint call sites
In reply to Steven RostedtFrom: Vineeth Pillai <[email protected]>
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.
Original v2 series:
https://lore.kernel.org/linux-trace-kernel/[email protected]/
Parts of the original v2 series have already been merged in mainline. This patch is being reposted as a follow-up cleanup for the remaining unmerged pieces.
--- arch/x86/lib/msr.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/x86/lib/msr.c +3 -3
@@ -125,21 +125,21 @@ EXPORT_SYMBOL_FOR_KVM(msr_clear_bit);#ifdef CONFIG_TRACEPOINTS void do_trace_write_msr (u32 msr,u64 val,int failed) { -trace_write_msr (msr, val, failed); +trace_call__write_msr (msr, val, failed); }EXPORT_SYMBOL (do_trace_write_msr);EXPORT_TRACEPOINT_SYMBOL (write_msr);void do_trace_read_msr (u32 msr,u64 val,int failed) { -trace_read_msr (msr, val, failed); +trace_call__read_msr (msr, val, failed); }EXPORT_SYMBOL (do_trace_read_msr);EXPORT_TRACEPOINT_SYMBOL (read_msr);void do_trace_rdpmc (u32 msr,u64 val,int failed) { -trace_rdpmc (msr, val, failed); +trace_call__rdpmc (msr, val, failed); }EXPORT_SYMBOL (do_trace_rdpmc);EXPORT_TRACEPOINT_SYMBOL (rdpmc);
Signature · 1 line
2.53.0