Skip to content

Commit

Permalink
Remove extra S_MAXSTAT array allocation in some tools
Browse files Browse the repository at this point in the history
Fixes: iovisor#1280
Signed-off-by: Brenden Blanco <[email protected]>
  • Loading branch information
drzaeus77 committed Aug 16, 2017
1 parent 4cb1edb commit d51870b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion tools/dcstat.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def usage():
S_MAXSTAT
};
BPF_ARRAY(stats, u64, S_MAXSTAT + 1);
BPF_ARRAY(stats, u64, S_MAXSTAT);
/*
* How this is instrumented, and how to interpret the statistics, is very much
Expand Down
2 changes: 1 addition & 1 deletion tools/pidpersec.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
S_MAXSTAT
};
BPF_ARRAY(stats, u64, S_MAXSTAT + 1);
BPF_ARRAY(stats, u64, S_MAXSTAT);
static void stats_increment(int key) {
u64 *leaf = stats.lookup(&key);
Expand Down
2 changes: 1 addition & 1 deletion tools/vfsstat.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def usage():
S_MAXSTAT
};
BPF_ARRAY(stats, u64, S_MAXSTAT + 1);
BPF_ARRAY(stats, u64, S_MAXSTAT);
static void stats_increment(int key) {
u64 *leaf = stats.lookup(&key);
Expand Down

0 comments on commit d51870b

Please sign in to comment.