Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\trace\trace_hwlat.c Create Date:2022-07-28 12:10:41
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:trace_hwlat_sample

Proto:static void trace_hwlat_sample(struct hwlat_sample *sample)

Type:void

Parameter:

TypeParameterName
struct hwlat_sample *sample
105  tr = hwlat_trace
106  call = event_hwlat
107  buffer = buffer
113  pc = We mask the PREEMPT_NEED_RESCHED bit so as not to confuse all current users* that think a non-zero value indicates we cannot preempt.
114  local_save_flags(flags)
116  event = trace_buffer_lock_reserve(buffer, TRACE_HWLAT, size of entry , flags, pc)
118  If Not event Then Return
120  entry = g_buffer_event_data - return the data of the event*@event: the event to get the data from
121  seqnum = unique sequence
122  duration = delta
123  outer_duration = delta (outer loop)
124  timestamp = wall time
125  nmi_total_ts = Total time spent in NMIs
126  nmi_count = # NMIs during this sample
128  If Not call_filter_check_discard(call, entry, buffer, event) Then Similar to trace_buffer_unlock_commit_regs() but do not dump stack.
Caller
NameDescribe
get_sampleget_sample - sample the CPU TSC and look for likely hardware latencies* Used to repeatedly capture the CPU TSC (or similar), looking for potential* hardware-induced latency. Called with interrupts disabled and with* hwlat_data.lock held.