Skip to content

Commit

Permalink
Merge pull request iovisor#1361 from navytux/y/hardirqs-d-fix
Browse files Browse the repository at this point in the history
hardirqs, softirqs: Fix distribution mode units handling
  • Loading branch information
brendangregg authored Oct 11, 2017
2 parents 920319d + f2d125e commit 0e8c031
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tools/hardirqs.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@
# code substitutions
if args.dist:
bpf_text = bpf_text.replace('STORE',
'irq_key_t key = {.slot = bpf_log2l(delta)};' +
'irq_key_t key = {.slot = bpf_log2l(delta / %d)};' % factor +
'bpf_probe_read(&key.name, sizeof(key.name), name);' +
'dist.increment(key);')
else:
Expand Down
2 changes: 1 addition & 1 deletion tools/softirqs.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@
# code substitutions
if args.dist:
bpf_text = bpf_text.replace('STORE',
'key.vec = vec; key.slot = bpf_log2l(delta); ' +
'key.vec = vec; key.slot = bpf_log2l(delta / %d); ' % factor +
'dist.increment(key);')
else:
bpf_text = bpf_text.replace('STORE',
Expand Down

0 comments on commit 0e8c031

Please sign in to comment.