• A
    perf env: Introduce read_cpu_topology_map() method · aa36ddd7
    Arnaldo Carvalho de Melo 提交于
    Out of the code to write the cpu topology map in the perf.data file
    header.
    
    Now if one needs the CPU topology map for the running machine, one needs
    to call perf_env__read_cpu_topology_map(perf_env) and the info will be
    stored in perf_env.cpu.
    
    For now we're using a global perf_env variable, that will have its
    contents freed after we run a builtin.
    
    v2: Check perf_env__read_cpu_topology_map() return in
        write_cpu_topology() (Kan Liang)
    
    Cc: Adrian Hunter <adrian.hunter@intel.com>
    Cc: Borislav Petkov <bp@suse.de>
    Cc: David Ahern <dsahern@gmail.com>
    Cc: Frederic Weisbecker <fweisbec@gmail.com>
    Cc: Jiri Olsa <jolsa@redhat.com>
    Cc: Kan Liang <kan.liang@intel.com>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Stephane Eranian <eranian@google.com>
    Cc: Wang Nan <wangnan0@huawei.com>
    Link: http://lkml.kernel.org/r/1441828225-667-5-git-send-email-acme@kernel.orgSigned-off-by: NArnaldo Carvalho de Melo <acme@redhat.com>
    aa36ddd7
header.c 61.5 KB