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
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-62e503b7ed98fcdf16308cda0b5378e7840f4339@git.kernel.org>
Date:	Fri, 30 Jan 2015 10:33:20 -0800
From:	tip-bot for Namhyung Kim <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	adrian.hunter@...el.com, hpa@...or.com, tglx@...utronix.de,
	acme@...hat.com, namhyung@...nel.org, dsahern@...il.com,
	andi@...stfloor.org, jolsa@...hat.com, fweisbec@...il.com,
	mingo@...nel.org, a.p.zijlstra@...llo.nl, eranian@...gle.com,
	linux-kernel@...r.kernel.org
Subject: [tip:perf/core] perf evsel:
  Set attr.task bit for a tracking event

Commit-ID:  62e503b7ed98fcdf16308cda0b5378e7840f4339
Gitweb:     http://git.kernel.org/tip/62e503b7ed98fcdf16308cda0b5378e7840f4339
Author:     Namhyung Kim <namhyung@...nel.org>
AuthorDate: Thu, 29 Jan 2015 17:06:46 +0900
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Thu, 29 Jan 2015 16:54:59 -0300

perf evsel: Set attr.task bit for a tracking event

The perf_event_attr.task bit is to track task (fork and exit) events but
it missed to be set by perf_evsel__config().  While it was not a problem
in practice since setting other bits (comm/mmap) ended up being in same
result, it'd be good to set it explicitly anyway.

The attr->task is to track task related events (fork/exit) only but
other meta events like comm and mmap[2] also needs the task events.  So
setting attr->comm and/or attr->mmap causes the kernel emits the task
events anyway.  So the attr->task is only meaningful when other bits are
off but I'd like to set it for completeness.

Signed-off-by: Namhyung Kim <namhyung@...nel.org>
Cc: Adrian Hunter <adrian.hunter@...el.com>
Cc: Andi Kleen <andi@...stfloor.org>
Cc: David Ahern <dsahern@...il.com>
Cc: Frederic Weisbecker <fweisbec@...il.com>
Cc: Jiri Olsa <jolsa@...hat.com>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Stephane Eranian <eranian@...gle.com>
Link: http://lkml.kernel.org/r/1422518843-25818-6-git-send-email-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 tools/perf/util/evsel.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/perf/util/evsel.c b/tools/perf/util/evsel.c
index 1d826d6..ea51a90 100644
--- a/tools/perf/util/evsel.c
+++ b/tools/perf/util/evsel.c
@@ -709,6 +709,7 @@ void perf_evsel__config(struct perf_evsel *evsel, struct record_opts *opts)
 	if (opts->sample_weight)
 		perf_evsel__set_sample_bit(evsel, WEIGHT);
 
+	attr->task  = track;
 	attr->mmap  = track;
 	attr->mmap2 = track && !perf_missing_features.mmap2;
 	attr->comm  = track;
--
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ