File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -682,6 +682,14 @@ struct x86_pmu {
682
682
*/
683
683
atomic_t lbr_exclusive [x86_lbr_exclusive_max ];
684
684
685
+ /*
686
+ * perf task context (i.e. struct perf_event_context::task_ctx_data)
687
+ * switch helper to bridge calls from perf/core to perf/x86.
688
+ * See struct pmu::swap_task_ctx() usage for examples;
689
+ */
690
+ void (* swap_task_ctx )(struct perf_event_context * prev ,
691
+ struct perf_event_context * next );
692
+
685
693
/*
686
694
* AMD bits
687
695
*/
Original file line number Diff line number Diff line change @@ -410,6 +410,15 @@ struct pmu {
410
410
*/
411
411
size_t task_ctx_size ;
412
412
413
+ /*
414
+ * PMU specific parts of task perf event context (i.e. ctx->task_ctx_data)
415
+ * can be synchronized using this function. See Intel LBR callstack support
416
+ * implementation and Perf core context switch handling callbacks for usage
417
+ * examples.
418
+ */
419
+ void (* swap_task_ctx ) (struct perf_event_context * prev ,
420
+ struct perf_event_context * next );
421
+ /* optional */
413
422
414
423
/*
415
424
* Set up pmu-private data structures for an AUX area
You can’t perform that action at this time.
0 commit comments