lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Fri, 7 Aug 2009 06:37:07 GMT From: tip-bot for Peter Zijlstra <a.p.zijlstra@...llo.nl> To: linux-tip-commits@...r.kernel.org Cc: linux-kernel@...r.kernel.org, Brice.Goglin@...ia.fr, hpa@...or.com, mingo@...hat.com, a.p.zijlstra@...llo.nl, tglx@...utronix.de, mingo@...e.hu Subject: [tip:perfcounters/urgent] perf tools: Fix multi-counter stat bug caused by incorrect reading of perf.data file header Commit-ID: 28d4db10a0f2a2a6cb9a843522f433ff0185c784 Gitweb: http://git.kernel.org/tip/28d4db10a0f2a2a6cb9a843522f433ff0185c784 Author: Peter Zijlstra <a.p.zijlstra@...llo.nl> AuthorDate: Thu, 6 Aug 2009 20:57:41 +0200 Committer: Ingo Molnar <mingo@...e.hu> CommitDate: Fri, 7 Aug 2009 08:32:55 +0200 perf tools: Fix multi-counter stat bug caused by incorrect reading of perf.data file header 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 <Brice.Goglin@...ia.fr> Signed-off-by: Peter Zijlstra <a.p.zijlstra@...llo.nl> Tested-by: Brice Goglin <Brice.Goglin@...ia.fr> Cc: paulus@...ba.org LKML-Reference: <1249585061.4975.17.camel@...top> Signed-off-by: Ingo Molnar <mingo@...e.hu> --- tools/perf/util/header.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/tools/perf/util/header.c b/tools/perf/util/header.c index 450384b..95a44bc 100644 --- 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); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists