aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/util/symbol.h
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2012-04-19 10:57:06 -0300
committerArnaldo Carvalho de Melo <acme@redhat.com>2012-04-19 10:57:06 -0300
commit1b2e2df4e395293e65dbda49e58cb4c7abeb7507 (patch)
tree86c1fbbe6da27fee35bcaf676359f24c481fdc13 /tools/perf/util/symbol.h
parentperf annotate browser: Rename disasm_line_rb_node (diff)
downloadlinux-dev-1b2e2df4e395293e65dbda49e58cb4c7abeb7507.tar.xz
linux-dev-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.h5
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 {