Commit ed02ad8a authored by Brendan Gregg's avatar Brendan Gregg

runqlen: use bpf_get_smp_processor_id()

parent e80df106
...@@ -99,7 +99,7 @@ if args.cpus: ...@@ -99,7 +99,7 @@ if args.cpus:
bpf_text = bpf_text.replace('STORAGE', bpf_text = bpf_text.replace('STORAGE',
'BPF_HISTOGRAM(dist, cpu_key_t);') 'BPF_HISTOGRAM(dist, cpu_key_t);')
bpf_text = bpf_text.replace('STORE', 'cpu_key_t key = {.slot = len}; ' + bpf_text = bpf_text.replace('STORE', 'cpu_key_t key = {.slot = len}; ' +
'bpf_probe_read(&key.cpu, sizeof(key.cpu), &task->wake_cpu);' + 'key.cpu = bpf_get_smp_processor_id(); ' +
'dist.increment(key);') 'dist.increment(key);')
else: else:
bpf_text = bpf_text.replace('STORAGE', bpf_text = bpf_text.replace('STORAGE',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment