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: <20180124115143.14322-20-jolsa@kernel.org>
Date:   Wed, 24 Jan 2018 12:51:41 +0100
From:   Jiri Olsa <jolsa@...nel.org>
To:     Peter Zijlstra <a.p.zijlstra@...llo.nl>,
        Ingo Molnar <mingo@...nel.org>
Cc:     lkml <linux-kernel@...r.kernel.org>,
        Namhyung Kim <namhyung@...nel.org>,
        David Ahern <dsahern@...il.com>,
        Andi Kleen <ak@...ux.intel.com>,
        Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
        Andy Lutomirski <luto@...capital.net>,
        Arnaldo Carvalho de Melo <acme@...nel.org>
Subject: [PATCH 19/21] perf script: Display USER_DATA misc char for sample

Adding support to display sample USER_DATA misc misc char
for sample event:

  # perf script -F +misc ...
   sched-messaging  1414 KD    28690.636582:       4590 cycles ...
  new misc field   ______/

Assigning the letter 'D' for PERF_RECORD_MISC_USER_DATA.

Link: http://lkml.kernel.org/n/tip-8wczn7vnmgd98cxpemq9g832@git.kernel.org
Signed-off-by: Jiri Olsa <jolsa@...nel.org>
---
 tools/perf/Documentation/perf-script.txt | 1 +
 tools/perf/builtin-script.c              | 4 ++++
 2 files changed, 5 insertions(+)

diff --git a/tools/perf/Documentation/perf-script.txt b/tools/perf/Documentation/perf-script.txt
index 0d1db8c7d2d1..d1425f067ad5 100644
--- a/tools/perf/Documentation/perf-script.txt
+++ b/tools/perf/Documentation/perf-script.txt
@@ -236,6 +236,7 @@ OPTIONS
 	  PERF_RECORD_MISC_MMAP_DATA*    M
 	  PERF_RECORD_MISC_COMM_EXEC     E
 	  PERF_RECORD_MISC_SWITCH_OUT    S
+	  PERF_RECORD_MISC_USER_DATA     D
 
 	  $ perf script -F +misc ...
 	   sched-messaging  1414 K     28690.636582:       4590 cycles ...
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c
index 7baa2e5d7f9e..45473c2d6e25 100644
--- a/tools/perf/builtin-script.c
+++ b/tools/perf/builtin-script.c
@@ -648,6 +648,10 @@ static int perf_sample__fprintf_start(struct perf_sample *sample,
 			ret += fprintf(fp, "g");
 
 		switch (type) {
+		case PERF_RECORD_SAMPLE:
+			if (has(USER_DATA))
+				ret += fprintf(fp, "D");
+			break;
 		case PERF_RECORD_MMAP:
 		case PERF_RECORD_MMAP2:
 			if (has(MMAP_DATA))
-- 
2.13.6

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ