Function report |
Source Code:kernel\events\core.c |
Create Date:2022-07-28 13:31:32 |
| Last Modify:2022-05-20 07:50:19 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:perf_sample_event_took
Proto:void perf_sample_event_took(u64 sample_len_ns)
Type:void
Parameter:
| Type | Parameter | Name |
|---|---|---|
| u64 | sample_len_ns |
| 512 | If max_len == 0 Then Return |
| 516 | running_len = Operations for contexts that are safe from preemption/interrupts. These* operations verify that preemption is disabled.(running_sample_length) |
| 518 | running_len += sample_len_ns |
| 530 | __report_avg = avg_len |
| 531 | __report_allowed = max_len |
| 537 | max = TICK_NSEC is the time between ticks in nsec assuming SHIFTED_HZ / 100 * sysctl_perf_cpu_time_max_percent |
| 540 | Else max = 1 |
| 546 | sysctl_perf_event_sample_rate = max * HZ |
| 549 | If Not Enqueue the irq work @work on the current CPU Then |
| 550 | early_printk("perf: interrupt took too long (%lld > %lld), lowering kernel.perf_event_max_sample_rate to %d\n", __report_avg, __report_allowed, sysctl_perf_event_sample_rate) |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |