Skip to content

Commit

Permalink
add description that blocktime event is only for 4.3 or newer
Browse files Browse the repository at this point in the history
In some kernels, although the version is older than 4.3, but their perf_event.h provide attribute context_switch which is in theory only available with kernel 4.3 or newer.
If this is the case, the configure will think the current platform is the new one, and "activate" kernel blocking module (BLOCTIME event). There is no build error nor crash during execution time. Only undefined event.
  • Loading branch information
laksono committed Oct 11, 2017
1 parent 6a790af commit c779ab0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/tool/hpcrun/sample-sources/perf/kernel_blocking.c
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,10 @@ void kernel_blocking_init()

event_custom_t *event_kernel_blocking = hpcrun_malloc(sizeof(event_custom_t));
event_kernel_blocking->name = EVNAME_KERNEL_BLOCK;
event_kernel_blocking->desc = "Approximation of a thread's blocking time. This event requires another event (such as CYCLES) to profile with. The unit time is hardware-dependent but mostly in microseconds.";
event_kernel_blocking->desc = "Approximation of a thread's blocking time."
" This event requires another event (such as CYCLES) to profile with."
" The unit time is hardware-dependent but mostly in microseconds."
" This event is only available on Linux kernel 4.3 or newer.";
event_kernel_blocking->register_fn = register_blocking; // call backs
event_kernel_blocking->handler_fn = NULL; // No call backs: we want all event to call us
event_kernel_blocking->metric_index = 0; // these fields to be defined later
Expand Down

0 comments on commit c779ab0

Please sign in to comment.