lkml.org 
[lkml]   [2012]   [Sep]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 4/4] perf tools: Back [vdso] DSO with real data
From
Date
On Mon, 2012-09-10 at 18:50 +0200, Jiri Olsa wrote:
> + maps = fopen("/proc/self/maps", "r");
> + if (!maps) {
> + pr_err("vdso: cannot open maps\n");
> + return -1;
> + }
> +
> + while (!found && fgets(line, sizeof(line), maps)) {
> + int m = -1;
> +
> + /* We care only about private r-x mappings. */
> + if (2 != sscanf(line, "%p-%p r-xp %*x %*x:%*x %*u %n",
> + start, end, &m))
> + continue;
> + if (m < 0)
> + continue;
> +
> + if (!strncmp(&line[m], VDSO__MAP_NAME,
> + sizeof(VDSO__MAP_NAME) - 1))
> + found = 1;
> + }

Argh.. :-) We so should have the vdso as a proper elf DSO somewhere
in /proc or /sys, but yeah, lacking that what you've done is about all
we can do.


\
 
 \ /
  Last update: 2012-09-10 20:01    [W:0.077 / U:0.772 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site