[PATCH 8/8] perf record: Just use "cycles:P" as the default event

Namhyung Kim posted 8 patches 1 month, 4 weeks ago
[PATCH 8/8] perf record: Just use "cycles:P" as the default event
Posted by Namhyung Kim 1 month, 4 weeks ago
The fallback logic can add ":u" modifier if needed.

Signed-off-by: Namhyung Kim <namhyung@kernel.org>
---
 tools/perf/builtin-record.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index adbaf80b398c1f4c..f8325247292112d7 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -4157,9 +4157,7 @@ int cmd_record(int argc, const char **argv)
 		record.opts.tail_synthesize = true;
 
 	if (rec->evlist->core.nr_entries == 0) {
-		bool can_profile_kernel = perf_event_paranoid_check(1);
-
-		err = parse_event(rec->evlist, can_profile_kernel ? "cycles:P" : "cycles:Pu");
+		err = parse_event(rec->evlist, "cycles:P");
 		if (err)
 			goto out;
 	}
-- 
2.46.1.824.gd892dcdcdd-goog
Re: [PATCH 8/8] perf record: Just use "cycles:P" as the default event
Posted by Ian Rogers 1 month, 3 weeks ago
On Mon, Sep 30, 2024 at 5:20 PM Namhyung Kim <namhyung@kernel.org> wrote:
>
> The fallback logic can add ":u" modifier if needed.
>
> Signed-off-by: Namhyung Kim <namhyung@kernel.org>

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

Thanks,
Ian

> ---
>  tools/perf/builtin-record.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
> index adbaf80b398c1f4c..f8325247292112d7 100644
> --- a/tools/perf/builtin-record.c
> +++ b/tools/perf/builtin-record.c
> @@ -4157,9 +4157,7 @@ int cmd_record(int argc, const char **argv)
>                 record.opts.tail_synthesize = true;
>
>         if (rec->evlist->core.nr_entries == 0) {
> -               bool can_profile_kernel = perf_event_paranoid_check(1);
> -
> -               err = parse_event(rec->evlist, can_profile_kernel ? "cycles:P" : "cycles:Pu");
> +               err = parse_event(rec->evlist, "cycles:P");
>                 if (err)
>                         goto out;
>         }
> --
> 2.46.1.824.gd892dcdcdd-goog
>