[PATCH 08/12] perf llvm: Pass available CPU number to clang compiler

2015-11-05 Thread Arnaldo Carvalho de Melo
From: Wang Nan This patch introduces a new macro "__NR_CPUS__" to perf's embedded clang compiler, which represent the available CPU counters in this system. BPF program can use this macro to create a map with same number of system CPUs. For exmaple: struct bpf_map_def SEC("maps") pmu_map = {

[PATCH 08/12] perf llvm: Pass available CPU number to clang compiler

2015-11-05 Thread Arnaldo Carvalho de Melo
From: Wang Nan This patch introduces a new macro "__NR_CPUS__" to perf's embedded clang compiler, which represent the available CPU counters in this system. BPF program can use this macro to create a map with same number of system CPUs. For exmaple: struct bpf_map_def