From: Brenden Blanco Date: Wed, 16 Aug 2017 18:29:23 +0000 (-0700) Subject: Remove extra S_MAXSTAT array allocation in some tools X-Git-Tag: submit/tizen_4.0/20171018.110122~40^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d51870b9749b44a14e8794606f63d1ab975a89f5;p=platform%2Fupstream%2Fbcc.git Remove extra S_MAXSTAT array allocation in some tools Fixes: #1280 Signed-off-by: Brenden Blanco --- 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);