projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1953287
)
perf tools: Fix multi-counter stat bug caused by incorrect reading of perf.data file...
author
Peter Zijlstra
<
[email protected]
>
Thu, 6 Aug 2009 18:57:41 +0000
(20:57 +0200)
committer
Ingo Molnar
<
[email protected]
>
Sun, 9 Aug 2009 10:54:34 +0000
(12:54 +0200)
Brice Goglin reported that only the first result from a
multi-counter perf record --stat run is accurate, the
rest looks bogus.
A silly mistake made us re-read the first attribute for
every recorded attribute.
Reported-by: Brice Goglin <
[email protected]
>
Signed-off-by: Peter Zijlstra <
[email protected]
>
Tested-by: Brice Goglin <
[email protected]
>
Cc:
[email protected]
Signed-off-by: Ingo Molnar <
[email protected]
>
tools/perf/util/header.c
patch
|
blob
|
history
diff --git
a/tools/perf/util/header.c
b/tools/perf/util/header.c
index 450384b3bbe53605db82ec2dc676aac0405ee531..95a44bcfc2dc5c7042f57dfe3ed49e6d5b1398a2 100644
(file)
--- a/
tools/perf/util/header.c
+++ b/
tools/perf/util/header.c
@@
-213,9
+213,10
@@
struct perf_header *perf_header__read(int fd)
for (i = 0; i < nr_attrs; i++) {
struct perf_header_attr *attr;
- off_t tmp
= lseek(fd, 0, SEEK_CUR)
;
+ off_t tmp;
do_read(fd, &f_attr, sizeof(f_attr));
+ tmp = lseek(fd, 0, SEEK_CUR);
attr = perf_header_attr__new(&f_attr.attr);