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-next>] [day] [month] [year] [list]
Message-ID: <1389501134-13116-1-git-send-email-gjain@fb.com>
Date:	Sat, 11 Jan 2014 20:32:14 -0800
From:	Gaurav Jain <gjain@...com>
To:	<linux-kernel@...r.kernel.org>
CC:	Gaurav Jain <gjain@...com>, Ingo Molnar <mingo@...nel.org>,
	Jiri Olsa <jolsa@...hat.com>,
	Paul Mackerras <paulus@...ba.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	Don Zickus <dzickus@...hat.com>, Arun Sharma <asharma@...com>
Subject: [PATCH] perf tools: Synthesize anon MMAP records on the heap

Anon records usually do not have the 'execname' entry. However if they are on
the heap, the execname shows up as '[heap]'. The fix considers any executable
entries in the map that do not have a name or are on the heap as anon records
and sets the name to '//anon'.

This fixes JIT profiling for records on the heap.

Signed-off-by: Gaurav Jain <gjain@...com>
Cc: Ingo Molnar <mingo@...nel.org>
Cc: Jiri Olsa <jolsa@...hat.com>
Cc: Paul Mackerras <paulus@...ba.org>
Cc: Peter Zijlstra <a.p.zijlstra@...llo.nl>
Cc: Don Zickus <dzickus@...hat.com>
Cc: Arun Sharma <asharma@...com>
---
 tools/perf/util/event.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/tools/perf/util/event.c b/tools/perf/util/event.c
index bb788c1..ae9c55b 100644
--- a/tools/perf/util/event.c
+++ b/tools/perf/util/event.c
@@ -224,10 +224,9 @@ static int perf_event__synthesize_mmap_events(struct perf_tool *tool,
 				continue;
 
 			event->header.misc |= PERF_RECORD_MISC_MMAP_DATA;
-		}
-
-		if (!strcmp(execname, ""))
+		} if (!strcmp(execname, "") || !strcmp(execname, "[heap]")) {
 			strcpy(execname, anonstr);
+		}
 
 		size = strlen(execname) + 1;
 		memcpy(event->mmap.filename, execname, size);
-- 
1.8.1

--
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