• Ian Rogers's avatar
    libperf cpumap: Add "any CPU"/dummy test function · 916ce34a
    Ian Rogers authored
    It is common in the code currently to test a map for "empty" when in
    fact the "any CPU"/dummy value of -1 is being sought. Add a new
    function to enable this and document the behavior of two other
    functions.
    
    The term "any CPU" comes from perf_event_open, where the value is
    consumed, but it is more typical in the code to see this value/map
    referred to as the dummy value. This could be misleading due to the
    dummy event and also dummy not being intention revealing, so it is hoped
    to migrate the code to referring to this as "any CPU".
    Reviewed-by: default avatarKan Liang <kan.liang@linux.intel.com>
    Signed-off-by: default avatarIan Rogers <irogers@google.com>
    Cc: Adrian Hunter <adrian.hunter@intel.com>
    Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
    Cc: Ali Saidi <alisaidi@amazon.com>
    Cc: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
    Cc: Dmitrii Dolgov <9erthalion6@gmail.com>
    Cc: Huacai Chen <chenhuacai@kernel.org>
    Cc: Ingo Molnar <mingo@redhat.com>
    Cc: James Clark <james.clark@arm.com>
    Cc: Jing Zhang <renyu.zj@linux.alibaba.com>
    Cc: Jiri Olsa <jolsa@kernel.org>
    Cc: John Garry <john.g.garry@oracle.com>
    Cc: Kajol Jain <kjain@linux.ibm.com>
    Cc: Kang Minchul <tegongkang@gmail.com>
    Cc: Leo Yan <leo.yan@linaro.org>
    Cc: Madhavan Srinivasan <maddy@linux.ibm.com>
    Cc: Mark Rutland <mark.rutland@arm.com>
    Cc: Mike Leach <mike.leach@linaro.org>
    Cc: Ming Wang <wangming01@loongson.cn>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Ravi Bangoria <ravi.bangoria@amd.com>
    Cc: Rob Herring <robh@kernel.org>
    Cc: Sandipan Das <sandipan.das@amd.com>
    Cc: Sean Christopherson <seanjc@google.com>
    Cc: Suzuki Poulouse <suzuki.poulose@arm.com>
    Cc: Thomas Richter <tmricht@linux.ibm.com>
    Cc: Will Deacon <will@kernel.org>
    Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
    Cc: coresight@lists.linaro.org
    Cc: linux-arm-kernel@lists.infradead.org
    Link: https://lore.kernel.org/r/20230527072210.2900565-4-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    916ce34a
cpumap.c 10.6 KB