Skip to content
This repository was archived by the owner on Apr 2, 2025. It is now read-only.

Commit c779ab0

Browse files
committed
add description that blocktime event is only for 4.3 or newer
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.
1 parent 6a790af commit c779ab0

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/tool/hpcrun/sample-sources/perf/kernel_blocking.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,7 +286,10 @@ void kernel_blocking_init()
286286

287287
event_custom_t *event_kernel_blocking = hpcrun_malloc(sizeof(event_custom_t));
288288
event_kernel_blocking->name = EVNAME_KERNEL_BLOCK;
289-
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.";
289+
event_kernel_blocking->desc = "Approximation of a thread's blocking time."
290+
" This event requires another event (such as CYCLES) to profile with."
291+
" The unit time is hardware-dependent but mostly in microseconds."
292+
" This event is only available on Linux kernel 4.3 or newer.";
290293
event_kernel_blocking->register_fn = register_blocking; // call backs
291294
event_kernel_blocking->handler_fn = NULL; // No call backs: we want all event to call us
292295
event_kernel_blocking->metric_index = 0; // these fields to be defined later

0 commit comments

Comments
 (0)