projects
/
platform
/
kernel
/
linux-rpi3.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2745170
)
perf tools: Future-proof thread_map allocation size calculation
author
Arnaldo Carvalho de Melo
<acme@redhat.com>
Thu, 25 Jun 2015 17:48:49 +0000
(14:48 -0300)
committer
Arnaldo Carvalho de Melo
<acme@redhat.com>
Thu, 25 Jun 2015 18:15:49 +0000
(15:15 -0300)
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Stephane Eranian <eranian@google.com>
Link:
http://lkml.kernel.org/r/20150625174840.GH3253@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/perf/util/thread_map.c
patch
|
blob
|
history
diff --git
a/tools/perf/util/thread_map.c
b/tools/perf/util/thread_map.c
index
8c3c3a0
..
920136d
100644
(file)
--- a/
tools/perf/util/thread_map.c
+++ b/
tools/perf/util/thread_map.c
@@
-22,7
+22,7
@@
static int filter(const struct dirent *dir)
static struct thread_map *thread_map__realloc(struct thread_map *map, int nr)
{
- size_t size = sizeof(*map) + sizeof(
pid_t
) * nr;
+ size_t size = sizeof(*map) + sizeof(
map->map[0]
) * nr;
return realloc(map, size);
}