• Ian Rogers's avatar
    perf evsel: Fallback to "task-clock" when not system wide · eb2eac0c
    Ian Rogers authored
    When the "cycles" event isn't available evsel will fallback to the
    "cpu-clock" software event.
    
    "task-clock" is similar to "cpu-clock" but only runs when the process is
    running.
    
    Falling back to "cpu-clock" when not system wide leads to confusion, by
    falling back to "task-clock" it is hoped the confusion is less.
    
    Pass the target to determine if "task-clock" is more appropriate.
    
    Update a nearby comment and debug string for the change.
    Signed-off-by: default avatarIan Rogers <irogers@google.com>
    Tested-by: default avatarAthira Rajeev <atrajeev@linux.vnet.ibm.com>
    Acked-by: default avatarNamhyung Kim <namhyung@kernel.org>
    Cc: Adrian Hunter <adrian.hunter@intel.com>
    Cc: Ajay Kaher <akaher@vmware.com>
    Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
    Cc: Alexey Makhalov <amakhalov@vmware.com>
    Cc: Ian Rogers <irogers@google.com>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: Jiri Olsa <jolsa@kernel.org>
    Cc: Kan Liang <kan.liang@linux.intel.com>
    Cc: Leo Yan <leo.yan@linaro.org>
    Cc: Mark Rutland <mark.rutland@arm.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Ravi Bangoria <ravi.bangoria@amd.com>
    Cc: Sandipan Das <sandipan.das@amd.com>
    Cc: Yang Jihong <yangjihong1@huawei.com>
    Link: https://lore.kernel.org/r/20231121000420.368075-1-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    eb2eac0c
evsel.c 81.8 KB