From: Peter Zijlstra <peterz@infradead.org>
To: Steven Rostedt <rostedt@goodmis.org>
Cc: Viktor Rosendahl <viktor.rosendahl@gmail.com>,
Ingo Molnar <mingo@redhat.com>,
linux-kernel@vger.kernel.org,
Joel Fernandes <joel@joelfernandes.org>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Subject: Re: [PATCH v4 1/4] ftrace: Implement fs notification for tracing_max_latency
Date: Wed, 22 May 2019 16:31:50 +0200 [thread overview]
Message-ID: <20190522143150.GF16275@worktop.programming.kicks-ass.net> (raw)
In-Reply-To: <20190521120142.186487e9@gandalf.local.home>
On Tue, May 21, 2019 at 12:01:42PM -0400, Steven Rostedt wrote:
>
> [ Added Peter and Rafael ]
Thanks Steve,
> On Fri, 17 May 2019 22:34:27 +0200
> Viktor Rosendahl <viktor.rosendahl@gmail.com> wrote:
> > diff --git a/include/trace/events/sched.h b/include/trace/events/sched.h
> > index c8c7c7efb487..a1a1befea1c1 100644
> > --- a/include/trace/events/sched.h
> > +++ b/include/trace/events/sched.h
> > @@ -183,6 +183,46 @@ TRACE_EVENT(sched_switch,
> > __entry->next_comm, __entry->next_pid, __entry->next_prio)
> > );
> >
> > +/*
> > + * Tracepoint for entering __schedule():
> > + */
> > +TRACE_EVENT(sched_schedule_enter,
> > +
> > + TP_PROTO(int cpu),
> > +
> > + TP_ARGS(cpu),
> > +
> > + TP_STRUCT__entry(
> > + __field(int, cpu)
> > + ),
> > +
> > + TP_fast_assign(
> > + __entry->cpu = cpu;
> > + ),
> > +
> > + TP_printk("cpu=%d", __entry->cpu)
> > +);
> > +
> > +/*
> > + * Tracepoint for exiting __schedule():
> > + */
> > +TRACE_EVENT(sched_schedule_exit,
> > +
> > + TP_PROTO(int cpu),
> > +
> > + TP_ARGS(cpu),
> > +
> > + TP_STRUCT__entry(
> > + __field(int, cpu)
> > + ),
> > +
> > + TP_fast_assign(
> > + __entry->cpu = cpu;
> > + ),
> > +
> > + TP_printk("cpu=%d", __entry->cpu)
> > +);
> > +
> > /*
> > * Tracepoint for a task being migrated:
> > */
> > diff --git a/kernel/sched/core.c b/kernel/sched/core.c
> > index 102dfcf0a29a..c9d86fcc48f5 100644
> > --- a/kernel/sched/core.c
> > +++ b/kernel/sched/core.c
> > @@ -3374,6 +3374,7 @@ static void __sched notrace __schedule(bool preempt)
> > int cpu;
> >
> > cpu = smp_processor_id();
> > + trace_sched_schedule_enter(cpu);
> > rq = cpu_rq(cpu);
> > prev = rq->curr;
> >
> > @@ -3448,6 +3449,7 @@ static void __sched notrace __schedule(bool preempt)
> > }
> >
> > balance_callback(rq);
> > + trace_sched_schedule_exit(cpu);
> > }
> >
> > void __noreturn do_task_dead(void)
> > diff --git a/kernel/sched/idle.c b/kernel/sched/idle.c
> > index f5516bae0c1b..e328e045c6e8 100644
> > --- a/kernel/sched/idle.c
> > +++ b/kernel/sched/idle.c
> > @@ -224,6 +224,7 @@ static void cpuidle_idle_call(void)
> > static void do_idle(void)
> > {
> > int cpu = smp_processor_id();
> > + trace_do_idle_enter(cpu);
> > /*
> > * If the arch has a polling bit, we maintain an invariant:
> > *
> > @@ -287,6 +288,7 @@ static void do_idle(void)
> >
> > if (unlikely(klp_patch_pending(current)))
> > klp_update_patch_state(current);
> > + trace_do_idle_exit(cpu);
> > }
> >
> > bool cpu_in_idle(unsigned long pc)
NAK!
next prev parent reply other threads:[~2019-05-22 14:32 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-17 20:34 [PATCH v4 0/4] Some new features for the latency tracers Viktor Rosendahl
2019-05-17 20:34 ` [PATCH v4 1/4] ftrace: Implement fs notification for tracing_max_latency Viktor Rosendahl
2019-05-21 16:01 ` Steven Rostedt
2019-05-22 0:30 ` Viktor Rosendahl
2019-05-22 1:09 ` Steven Rostedt
2019-05-22 14:35 ` Peter Zijlstra
2019-05-22 14:43 ` Steven Rostedt
2019-05-22 14:31 ` Peter Zijlstra [this message]
2019-05-17 20:34 ` [PATCH v4 2/4] preemptirq_delay_test: Add the burst feature and a sysfs trigger Viktor Rosendahl
2019-05-17 20:34 ` [PATCH v4 3/4] Add the latency-collector to tools Viktor Rosendahl
2019-05-17 20:34 ` [PATCH v4 4/4] ftrace: Add an option for tracing console latencies Viktor Rosendahl
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190522143150.GF16275@worktop.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=joel@joelfernandes.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rafael.j.wysocki@intel.com \
--cc=rostedt@goodmis.org \
--cc=viktor.rosendahl@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox