Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 191173
b: refs/heads/master
c: 4af8b35
h: refs/heads/master
i:
  191171: c5acf67
v: v3
  • Loading branch information
Anton Blanchard authored and Arnaldo Carvalho de Melo committed Apr 3, 2010
1 parent 87f842b commit 6e9bcd2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e206d556c5793ac5e28c0aaba2e07432e5f9a098
refs/heads/master: 4af8b35db6634dd1e0d616de689582b6c93550af
9 changes: 9 additions & 0 deletions trunk/tools/perf/util/event.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ static int event__synthesize_mmap_events(pid_t pid, pid_t tgid,
continue;
pbf += n + 3;
if (*pbf == 'x') { /* vm_exec */
u64 vm_pgoff;
char *execname = strchr(bf, '/');

/* Catch VDSO */
Expand All @@ -139,6 +140,14 @@ static int event__synthesize_mmap_events(pid_t pid, pid_t tgid,
if (execname == NULL)
continue;

pbf += 3;
n = hex2u64(pbf, &vm_pgoff);
/* pgoff is in bytes, not pages */
if (n >= 0)
ev.mmap.pgoff = vm_pgoff << getpagesize();
else
ev.mmap.pgoff = 0;

size = strlen(execname);
execname[size - 1] = '\0'; /* Remove \n */
memcpy(ev.mmap.filename, execname, size);
Expand Down

0 comments on commit 6e9bcd2

Please sign in to comment.