Commit d51870b9 authored by Brenden Blanco's avatar Brenden Blanco

Remove extra S_MAXSTAT array allocation in some tools

Fixes: #1280
Signed-off-by: default avatarBrenden Blanco <bblanco@gmail.com>
parent 4cb1edb6
...@@ -49,7 +49,7 @@ enum stats { ...@@ -49,7 +49,7 @@ enum stats {
S_MAXSTAT 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 * How this is instrumented, and how to interpret the statistics, is very much
......
...@@ -26,7 +26,7 @@ enum stat_types { ...@@ -26,7 +26,7 @@ enum stat_types {
S_MAXSTAT S_MAXSTAT
}; };
BPF_ARRAY(stats, u64, S_MAXSTAT + 1); BPF_ARRAY(stats, u64, S_MAXSTAT);
static void stats_increment(int key) { static void stats_increment(int key) {
u64 *leaf = stats.lookup(&key); u64 *leaf = stats.lookup(&key);
......
...@@ -49,7 +49,7 @@ enum stat_types { ...@@ -49,7 +49,7 @@ enum stat_types {
S_MAXSTAT S_MAXSTAT
}; };
BPF_ARRAY(stats, u64, S_MAXSTAT + 1); BPF_ARRAY(stats, u64, S_MAXSTAT);
static void stats_increment(int key) { static void stats_increment(int key) {
u64 *leaf = stats.lookup(&key); u64 *leaf = stats.lookup(&key);
......
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