[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20161125134324.GA16426@kernel.org>
Date: Fri, 25 Nov 2016 10:43:24 -0300
From: Arnaldo Carvalho de Melo <acme@...nel.org>
To: Namhyung Kim <namhyung@...nel.org>
Cc: Ingo Molnar <mingo@...nel.org>,
Peter Zijlstra <a.p.zijlstra@...llo.nl>,
Jiri Olsa <jolsa@...nel.org>,
LKML <linux-kernel@...r.kernel.org>,
David Ahern <dsahern@...il.com>,
Stephane Eranian <eranian@...gle.com>,
Andi Kleen <andi@...stfloor.org>
Subject: Re: [PATCH 1/3] perf sched timehist: Mark schedule function in
callchains
Em Thu, Nov 24, 2016 at 10:11:12AM +0900, Namhyung Kim escreveu:
> The sched_switch event always captured from the scheduler function. So
> it'd be great omit them from the callchain. This patch marks the
> functions to be omitted by later patch.
I just reorderded this so that after applying 1 I could right away test
it, i.e. 2/3 was applied first.
- Arnaldo
> Cc: David Ahern <dsahern@...il.com>
> Signed-off-by: Namhyung Kim <namhyung@...nel.org>
> ---
> tools/perf/builtin-sched.c | 21 +++++++++++++++++++++
> tools/perf/util/symbol.h | 1 +
> 2 files changed, 22 insertions(+)
>
> diff --git a/tools/perf/builtin-sched.c b/tools/perf/builtin-sched.c
> index 829468defa07..cd14189d3943 100644
> --- a/tools/perf/builtin-sched.c
> +++ b/tools/perf/builtin-sched.c
> @@ -1965,7 +1965,28 @@ static bool is_idle_sample(struct perf_sched *sched,
>
> return false;
> }
> +
> callchain_cursor_commit(cursor);
> +
> + while (true) {
> + struct callchain_cursor_node *node;
> + struct symbol *sym;
> +
> + node = callchain_cursor_current(cursor);
> + if (node == NULL)
> + break;
> +
> + sym = node->sym;
> + if (sym && sym->name) {
> + if (!strcmp(sym->name, "schedule") ||
> + !strcmp(sym->name, "__schedule") ||
> + !strcmp(sym->name, "preempt_schedule"))
> + sym->ignore = 1;
> + }
> +
> + callchain_cursor_advance(cursor);
> + }
> +
> return false;
> }
>
> diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h
> index dec7e2d44885..1bcbefc0c325 100644
> --- a/tools/perf/util/symbol.h
> +++ b/tools/perf/util/symbol.h
> @@ -58,6 +58,7 @@ struct symbol {
> u16 namelen;
> u8 binding;
> u8 idle:1;
> + u8 ignore:1;
> u8 arch_sym;
> char name[0];
> };
> --
> 2.10.0
Powered by blists - more mailing lists