diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/perf_event.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 057bf22..40150f3 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h @@ -747,6 +747,16 @@ struct perf_event { u64 tstamp_running; u64 tstamp_stopped; + /* + * timestamp shadows the actual context timing but it can + * be safely used in NMI interrupt context. It reflects the + * context time as it was when the event was last scheduled in. + * + * ctx_time already accounts for ctx->timestamp. Therefore to + * compute ctx_time for a sample, simply add perf_clock(). + */ + u64 shadow_ctx_time; + struct perf_event_attr attr; struct hw_perf_event hw; |