diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-04-19 10:57:06 -0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2012-04-19 10:57:06 -0300 |
commit | 1b2e2df4e395293e65dbda49e58cb4c7abeb7507 (patch) | |
tree | 86c1fbbe6da27fee35bcaf676359f24c481fdc13 /tools/perf/util/symbol.h | |
parent | 887c0066a810234cfae9927b3781b6a1c617fb39 (diff) | |
download | lwn-1b2e2df4e395293e65dbda49e58cb4c7abeb7507.tar.gz lwn-1b2e2df4e395293e65dbda49e58cb4c7abeb7507.zip |
perf symbols: Introduce symbol__size method
Fixing some off by one cases in the process.
Cc: David Ahern <dsahern@gmail.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Namhyung Kim <namhyung@gmail.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-fxumzufhk829z0q9anmvemea@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/symbol.h')
-rw-r--r-- | tools/perf/util/symbol.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h index ac49ef208a5f..1f003884f1ab 100644 --- a/tools/perf/util/symbol.h +++ b/tools/perf/util/symbol.h @@ -65,6 +65,11 @@ struct symbol { void symbol__delete(struct symbol *sym); +static inline size_t symbol__size(const struct symbol *sym) +{ + return sym->end - sym->start + 1; +} + struct strlist; struct symbol_conf { |