aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorWang Nan <[email protected]>2015-11-04 11:20:04 +0000
committerArnaldo Carvalho de Melo <[email protected]>2015-11-05 12:47:02 -0300
commit59f41af980f95cbd556a6dc2e064b412abc439cf (patch)
tree275d7385bf1a1e5d0ca91aa4e2295568aeff5874 /tools/perf/scripts/python/export-to-postgresql.py
parent98916392a0bdfd71668b711fd93915791f45df02 (diff)
perf llvm: Pass number of configured CPUs to clang compiler
This patch introduces a new macro "__NR_CPUS__" to perf's embedded clang compiler, which represent the number of configured CPUs in this system. BPF programs can use this macro to create a map with the same number of system CPUs. For example: struct bpf_map_def SEC("maps") pmu_map = { .type = BPF_MAP_TYPE_PERF_EVENT_ARRAY, .key_size = sizeof(int), .value_size = sizeof(u32), .max_entries = __NR_CPUS__, }; Signed-off-by: Wang Nan <[email protected]> Cc: Alexei Starovoitov <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Zefan Li <[email protected]> Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions