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] [day] [month] [year] [list]
Date:	Sun, 12 Jan 2014 10:37:32 -0800
From:	tip-bot for Dongsheng Yang <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	acme@...hat.com, linux-kernel@...r.kernel.org, hpa@...or.com,
	mingo@...nel.org, namhyung.kim@....com, jolsa@...hat.com,
	dsahern@...il.com, tglx@...utronix.de, yangds.fnst@...fujitsu.com
Subject: [tip:perf/core] perf tools:
  Do not synthesize the treads of default guest.

Commit-ID:  c239c25a82808ad2cbc795b69e621c4c24f154d6
Gitweb:     http://git.kernel.org/tip/c239c25a82808ad2cbc795b69e621c4c24f154d6
Author:     Dongsheng Yang <yangds.fnst@...fujitsu.com>
AuthorDate: Fri, 20 Dec 2013 15:53:00 -0500
Committer:  Arnaldo Carvalho de Melo <acme@...hat.com>
CommitDate: Mon, 23 Dec 2013 16:49:51 -0300

perf tools: Do not synthesize the treads of default guest.

As the default guest is designed to handle orphan kernel symboles with
--guestkallsysms and --guestmodules, it has no user space.

So we should skip synthesizing threads if machine is default guest.

Signed-off-by: Dongsheng Yang <yangds.fnst@...fujitsu.com>
Cc: David Ahern <dsahern@...il.com>
Cc: Ingo Molnar <mingo@...nel.org>
Cc: Jiri Olsa <jolsa@...hat.com>
Cc: Namhyung Kim <namhyung.kim@....com>
Link: http://lkml.kernel.org/r/e9ddb5dac6f963169657218b12ceb3c2030f54e8.1387572416.git.yangds.fnst@cn.fujitsu.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@...hat.com>
---
 tools/perf/util/event.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c
index 2905771..45a76c6 100644
--- a/tools/perf/util/event.c
+++ b/tools/perf/util/event.c
@@ -133,6 +133,9 @@ static pid_t perf_event__synthesize_comm(struct perf_tool *tool,
 		goto out;
 	}
 
+	if (machine__is_default_guest(machine))
+		return 0;
+
 	snprintf(filename, sizeof(filename), "%s/proc/%d/task",
 		 machine->root_dir, pid);
 
@@ -183,6 +186,9 @@ static int perf_event__synthesize_mmap_events(struct perf_tool *tool,
 	FILE *fp;
 	int rc = 0;
 
+	if (machine__is_default_guest(machine))
+		return 0;
+
 	snprintf(filename, sizeof(filename), "%s/proc/%d/maps",
 		 machine->root_dir, pid);
 
@@ -409,6 +415,9 @@ int perf_event__synthesize_threads(struct perf_tool *tool,
 	if (mmap_event == NULL)
 		goto out_free_comm;
 
+	if (machine__is_default_guest(machine))
+		return 0;
+
 	snprintf(proc_path, sizeof(proc_path), "%s/proc", machine->root_dir);
 	proc = opendir(proc_path);
 
--
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