[PATCH v7 02/10] perf evsel: Expose evsel__is_offcpu_event() for future use

Howard Chu posted 10 patches 2 weeks, 1 day ago
There is a newer version of this series
[PATCH v7 02/10] perf evsel: Expose evsel__is_offcpu_event() for future use
Posted by Howard Chu 2 weeks, 1 day ago
Signed-off-by: Howard Chu <howardchu95@gmail.com>
---
 tools/perf/util/evsel.c | 2 +-
 tools/perf/util/evsel.h | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index f780e30aa259..695f831b463d 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -1193,7 +1193,7 @@ static void evsel__set_default_freq_period(struct record_opts *opts,
 	}
 }
 
-static bool evsel__is_offcpu_event(struct evsel *evsel)
+bool evsel__is_offcpu_event(struct evsel *evsel)
 {
 	return evsel__is_bpf_output(evsel) && evsel__name_is(evsel, OFFCPU_EVENT);
 }
diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h
index 04934a7af174..7f68004507d8 100644
--- a/tools/perf/util/evsel.h
+++ b/tools/perf/util/evsel.h
@@ -554,4 +554,6 @@ u64 evsel__bitfield_swap_branch_flags(u64 value);
 void evsel__set_config_if_unset(struct perf_pmu *pmu, struct evsel *evsel,
 				const char *config_name, u64 val);
 
+bool evsel__is_offcpu_event(struct evsel *evsel);
+
 #endif /* __PERF_EVSEL_H */
-- 
2.43.0
Re: [PATCH v7 02/10] perf evsel: Expose evsel__is_offcpu_event() for future use
Posted by Ian Rogers 1 week, 5 days ago
On Fri, Nov 8, 2024 at 12:41 PM Howard Chu <howardchu95@gmail.com> wrote:
>
> Signed-off-by: Howard Chu <howardchu95@gmail.com>

Not sure if no commit message body is okay. Otherwise:

Reviewed-by: Ian Rogers <irogers@google.com>

Thanks,
Ian

> ---
>  tools/perf/util/evsel.c | 2 +-
>  tools/perf/util/evsel.h | 2 ++
>  2 files changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
> index f780e30aa259..695f831b463d 100644
> --- a/tools/perf/util/evsel.c
> +++ b/tools/perf/util/evsel.c
> @@ -1193,7 +1193,7 @@ static void evsel__set_default_freq_period(struct record_opts *opts,
>         }
>  }
>
> -static bool evsel__is_offcpu_event(struct evsel *evsel)
> +bool evsel__is_offcpu_event(struct evsel *evsel)
>  {
>         return evsel__is_bpf_output(evsel) && evsel__name_is(evsel, OFFCPU_EVENT);
>  }
> diff --git a/tools/perf/util/evsel.h b/tools/perf/util/evsel.h
> index 04934a7af174..7f68004507d8 100644
> --- a/tools/perf/util/evsel.h
> +++ b/tools/perf/util/evsel.h
> @@ -554,4 +554,6 @@ u64 evsel__bitfield_swap_branch_flags(u64 value);
>  void evsel__set_config_if_unset(struct perf_pmu *pmu, struct evsel *evsel,
>                                 const char *config_name, u64 val);
>
> +bool evsel__is_offcpu_event(struct evsel *evsel);
> +
>  #endif /* __PERF_EVSEL_H */
> --
> 2.43.0
>