perf record: Just use "cycles:P" as the default event
authorNamhyung Kim <namhyung@kernel.org>
Wed, 16 Oct 2024 06:23:58 +0000 (23:23 -0700)
committerNamhyung Kim <namhyung@kernel.org>
Tue, 22 Oct 2024 16:55:08 +0000 (09:55 -0700)
The fallback logic can add ":u" modifier if needed.

Reviewed-by: Ian Rogers <irogers@google.com>
Reviewed-by: James Clark <james.clark@linaro.org>
Reviewed-by: Ravi Bangoria <ravi.bangoria@amd.com>
Acked-by: Kan Liang <kan.liang@linux.intel.com>
Cc: James Clark <james.clark@arm.com>
Cc: Atish Patra <atishp@atishpatra.org>
Cc: Mingwei Zhang <mizhang@google.com>
Cc: Kajol Jain <kjain@linux.ibm.com>
Cc: Thomas Richter <tmricht@linux.ibm.com>
Cc: Palmer Dabbelt <palmer@rivosinc.com>
Link: https://lore.kernel.org/r/20241016062359.264929-9-namhyung@kernel.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/builtin-record.c

index adbaf80b398c1f4c27611368804d6cd8d38f3c95..f8325247292112d7f06d2be6358aaf22bfd99cc3 100644 (file)
@@ -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;
        }