diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-10-15 00:19:44 +0400 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2014-10-15 00:50:58 +0400 |
commit | 2c241bd35e6f626ad6f867dcf9fefdc2315f125f (patch) | |
tree | d6fd5a27175180423ef19d9c5efd8493f7cef305 /tools/perf/util/symbol.h | |
parent | eba85230de892e2a925c85dca1fe177e8b3d84d8 (diff) | |
download | linux-2c241bd35e6f626ad6f867dcf9fefdc2315f125f.tar.xz |
perf symbols: Make sym->end be the first address after the symbol range
To follow vm_area_struct->vm_end convention.
By adhering to the convention that ->end is the first address outside
the symbol's range we can do things like:
sym->end = start + len;
len = sym->end - sym->start;
This is also now the convention used for struct map->end, fixing some
off-by-one bugs.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Chuck Ebbert <cebbert.lkml@gmail.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Stephane Eranian <eranian@google.com>
Link: http://lkml.kernel.org/n/tip-agomujr7tuqaq6lu7kr6z7h6@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 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h index bec4b7bd09de..eb2c19bf8d90 100644 --- a/tools/perf/util/symbol.h +++ b/tools/perf/util/symbol.h @@ -95,7 +95,7 @@ void symbols__delete(struct rb_root *symbols); static inline size_t symbol__size(const struct symbol *sym) { - return sym->end - sym->start + 1; + return sym->end - sym->start; } struct strlist; |