[1/1] perf symbols: Add 'intel_idle_ibrs' to the list of idle symbols

Message ID ZR66Qgbcltt+zG7F@kernel.org
State New
Headers
Series [1/1] perf symbols: Add 'intel_idle_ibrs' to the list of idle symbols |

Commit Message

Arnaldo Carvalho de Melo Oct. 5, 2023, 1:29 p.m. UTC
  From: Arnaldo Carvalho de Melo <acme@redhat.com>

This is a longstanding to do list entry: we need a way to see that a
sample took place while in idle state, as the current way to do it is
to infer that by the name of the functions that in such state have
more samples, IOW: a hack.

Maybe we can do flip a bit in samples that take place inside the
enter/exit idle section in do_idle()?

But till then, add one more :-\

Cc: Adrian Hunter <adrian.hunter@intel.com>
cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@kernel.org>,
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/symbol.c | 1 +
 1 file changed, 1 insertion(+)
  

Comments

Namhyung Kim Oct. 6, 2023, 5:16 a.m. UTC | #1
Hi Arnaldo,

On Thu, Oct 5, 2023 at 6:29 AM Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
>
> From: Arnaldo Carvalho de Melo <acme@redhat.com>
>
> This is a longstanding to do list entry: we need a way to see that a
> sample took place while in idle state, as the current way to do it is
> to infer that by the name of the functions that in such state have
> more samples, IOW: a hack.
>
> Maybe we can do flip a bit in samples that take place inside the
> enter/exit idle section in do_idle()?
>
> But till then, add one more :-\
>
> Cc: Adrian Hunter <adrian.hunter@intel.com>
> cc: Frédéric Weisbecker <fweisbec@gmail.com>
> Cc: Ian Rogers <irogers@google.com>
> Cc: Ingo Molnar <mingo@kernel.org>,
> Cc: Jiri Olsa <jolsa@kernel.org>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Cc: Peter Zijlstra <peterz@infradead.org>
> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

Acked-by: Namhyung Kim <namhyung@kernel.org>

Thanks,
Namhyung


> ---
>  tools/perf/util/symbol.c | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
> index 5b54d2639df4740e..3c7f483bf85bbdaf 100644
> --- a/tools/perf/util/symbol.c
> +++ b/tools/perf/util/symbol.c
> @@ -718,6 +718,7 @@ static bool symbol__is_idle(const char *name)
>                 "cpu_startup_entry",
>                 "idle_cpu",
>                 "intel_idle",
> +               "intel_idle_ibrs",
>                 "default_idle",
>                 "native_safe_halt",
>                 "enter_idle",
> --
> 2.41.0
>
  
Namhyung Kim Oct. 12, 2023, 5:21 p.m. UTC | #2
On Thu, Oct 5, 2023 at 10:16 PM Namhyung Kim <namhyung@kernel.org> wrote:
>
> Hi Arnaldo,
>
> On Thu, Oct 5, 2023 at 6:29 AM Arnaldo Carvalho de Melo <acme@kernel.org> wrote:
> >
> > From: Arnaldo Carvalho de Melo <acme@redhat.com>
> >
> > This is a longstanding to do list entry: we need a way to see that a
> > sample took place while in idle state, as the current way to do it is
> > to infer that by the name of the functions that in such state have
> > more samples, IOW: a hack.
> >
> > Maybe we can do flip a bit in samples that take place inside the
> > enter/exit idle section in do_idle()?
> >
> > But till then, add one more :-\
> >
> > Cc: Adrian Hunter <adrian.hunter@intel.com>
> > cc: Frédéric Weisbecker <fweisbec@gmail.com>
> > Cc: Ian Rogers <irogers@google.com>
> > Cc: Ingo Molnar <mingo@kernel.org>,
> > Cc: Jiri Olsa <jolsa@kernel.org>
> > Cc: Namhyung Kim <namhyung@kernel.org>
> > Cc: Peter Zijlstra <peterz@infradead.org>
> > Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
>
> Acked-by: Namhyung Kim <namhyung@kernel.org>

Applied to perf-tools-next, thanks!
  

Patch

diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 5b54d2639df4740e..3c7f483bf85bbdaf 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -718,6 +718,7 @@  static bool symbol__is_idle(const char *name)
 		"cpu_startup_entry",
 		"idle_cpu",
 		"intel_idle",
+		"intel_idle_ibrs",
 		"default_idle",
 		"native_safe_halt",
 		"enter_idle",