From d51870b9749b44a14e8794606f63d1ab975a89f5 Mon Sep 17 00:00:00 2001 From: Brenden Blanco Date: Wed, 16 Aug 2017 11:29:23 -0700 Subject: [PATCH] Remove extra S_MAXSTAT array allocation in some tools Fixes: #1280 Signed-off-by: Brenden Blanco --- tools/dcstat.py | 2 +- tools/pidpersec.py | 2 +- tools/vfsstat.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/dcstat.py b/tools/dcstat.py index 202931e1..c74c79b5 100755 --- a/tools/dcstat.py +++ b/tools/dcstat.py @@ -49,7 +49,7 @@ enum stats { 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 diff --git a/tools/pidpersec.py b/tools/pidpersec.py index ddaaaa0a..c4490043 100755 --- a/tools/pidpersec.py +++ b/tools/pidpersec.py @@ -26,7 +26,7 @@ enum stat_types { 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); diff --git a/tools/vfsstat.py b/tools/vfsstat.py index 208e61a6..1764c601 100755 --- a/tools/vfsstat.py +++ b/tools/vfsstat.py @@ -49,7 +49,7 @@ enum stat_types { 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); -- 2.34.1