函数逻辑报告 |
Source Code:kernel\trace\trace_hwlat.c |
Create Date:2022-07-27 13:17:36 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:get_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.
函数原型:static int get_sample(void)
返回类型:int
参数:无
169 | tr等于hwlat_trace |
171 | last_total等于0 |
172 | sample等于0 |
173 | thresh等于tracing_thresh |
174 | outer_sample等于0 |
175 | ret等于负1 |
180 | nmi_total_ts等于0 |
181 | nmi_count等于0 |
190 | 循环 |
197 | diff等于time_to_us(time_sub(t1, last_t2)) |
199 | 如果diff小于0则 |
203 | 如果diff大于outer_sample则outer_sample等于diff |
208 | total等于time_to_us(time_sub(t2, start)) |
211 | 如果total小于last_total则 |
215 | last_total等于total |
218 | diff等于time_to_us(time_sub(t2, t1)) |
221 | 如果diff小于0则 |
229 | 当total小于等于active sampling portion of window 循环 |
235 | ret等于0 |
238 | 如果sample大于thresh或outer_sample大于thresh则 |
242 | ret等于1 |
248 | al since reset 自加 |
255 | trace_hwlat_sample( & s) |
257 | latency等于两数取大(sample, outer_sample) |
260 | 如果latency大于max_latency则 |
261 | max_latency等于latency |
262 | latency_fsnotify(tr) |
266 | out : |
267 | 返回:ret |
名称 | 描述 |
---|---|
kthread_fn | kthread_fn - The CPU time sampling/hardware latency detection kernel thread* Used to periodically sample the CPU TSC via a call to get_sample. We* disable interrupts, which does (intentionally) introduce latency since we |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |