lkml.org 
[lkml]   [2020]   [Aug]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/2] perf sched: Prefer sched_waking event when it exists
Em Fri, Aug 07, 2020 at 01:50:47PM -0600, David Ahern escreveu:
> On 8/7/20 1:43 PM, Arnaldo Carvalho de Melo wrote:
> >> @@ -2958,9 +2967,10 @@ static int timehist_check_attr(struct perf_sched *sched,
> >>
> >> static int perf_sched__timehist(struct perf_sched *sched)
> >> {
> >> - const struct evsel_str_handler handlers[] = {
> >> + struct evsel_str_handler handlers[] = {
> >> { "sched:sched_switch", timehist_sched_switch_event, },
> >> { "sched:sched_wakeup", timehist_sched_wakeup_event, },
> >> + { "sched:sched_waking", timehist_sched_wakeup_event, },
> >> { "sched:sched_wakeup_new", timehist_sched_wakeup_event, },
> >> };
> >> const struct evsel_str_handler migrate_handlers[] = {
> >> @@ -3018,6 +3028,11 @@ static int perf_sched__timehist(struct perf_sched *sched)
> >>
> >> setup_pager();
> >>
> >> + /* prefer sched_waking if it is captured */
> >> + if (perf_evlist__find_tracepoint_by_name(session->evlist,
> >> + "sched:sched_waking"))
> >> + handlers[1].handler = timehist_sched_wakeup_ignore;
> >> +
> >
> >
> > ouch, can't we figure out if its present and then don't ask for the
> > wakeup one to be recorded?
> >
>
> This is the analysis side. If someone recorded with sched:* we do not
> want to analyze both sched_wakeup and sched_waking. Rather, it should
> prefer the latter and ignore the former.

Right you are, thans for the explanation, I should've noticed that :)

- Arnaldoi

\
 
 \ /
  Last update: 2020-08-10 18:22    [W:0.056 / U:0.060 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site