lkml.org 
[lkml]   [2024]   [Mar]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [RFC PATCH 02/41] perf: Support guest enter/exit interfaces
Hi Kan,

>
> +static void __perf_force_exclude_guest_pmu(struct perf_event_pmu_context *pmu_ctx,
> + struct perf_event *event)
> +{
> + struct perf_event_context *ctx = pmu_ctx->ctx;
> + struct perf_event *sibling;
> + bool include_guest = false;
> +
> + event_sched_out(event, ctx);
> + if (!event->attr.exclude_guest)
> + include_guest = true;
> + for_each_sibling_event(sibling, event) {
> + event_sched_out(sibling, ctx);
> + if (!sibling->attr.exclude_guest)
> + include_guest = true;
> + }
> + if (include_guest) {
> + perf_event_set_state(event, PERF_EVENT_STATE_ERROR);
> + for_each_sibling_event(sibling, event)
> + perf_event_set_state(event, PERF_EVENT_STATE_ERROR);
> + }
Does the perf core revert the PERF_EVENT_STATE_ERROR state somewhere
from the perf_guest_exit() path, or is it expected to remain in this
state?
IIUC, in the perf_guest_exit() path, when we land into
merge_sched_in(), we never schedule the event back if event->state <=
PERF_EVENT_STATE_OFF.

Thank you.
Raghavendra

\
 
 \ /
  Last update: 2024-05-27 15:56    [W:1.067 / U:0.008 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site