public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Jiri Olsa <jolsa@redhat.com>
Cc: linux-kernel@vger.kernel.org,
	Arnaldo Carvalho de Melo <acme@ghostprotocols.net>,
	Ingo Molnar <mingo@elte.hu>, Paul Mackerras <paulus@samba.org>,
	Frederic Weisbecker <fweisbec@gmail.com>
Subject: Re: [PATCH 4/4] perf tools: Back [vdso] DSO with real data
Date: Mon, 10 Sep 2012 18:56:29 +0200	[thread overview]
Message-ID: <1347296189.2124.31.camel@twins> (raw)
In-Reply-To: <1347295819-23177-5-git-send-email-jolsa@redhat.com>

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.

  reply	other threads:[~2012-09-10 16:56 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-10 16:50 [PATCH 0/4] perf tools: Back [vdso] DSO with real data Jiri Olsa
2012-09-10 16:50 ` [PATCH 1/4] perf tools: Do backtrace post unwind only if we regs and stack were captured Jiri Olsa
2012-09-14  5:58   ` [tip:perf/core] " tip-bot for Jiri Olsa
2012-09-10 16:50 ` [PATCH 2/4] perf tools: Add memdup function Jiri Olsa
2012-09-14  5:59   ` [tip:perf/core] " tip-bot for Jiri Olsa
2012-09-10 16:50 ` [PATCH 3/4] perf dso: Make dsos__find function globally available Jiri Olsa
2012-09-14  6:00   ` [tip:perf/core] perf symbols: " tip-bot for Jiri Olsa
2012-09-10 16:50 ` [PATCH 4/4] perf tools: Back [vdso] DSO with real data Jiri Olsa
2012-09-10 16:56   ` Peter Zijlstra [this message]
2012-09-14  6:01   ` [tip:perf/core] " tip-bot for Jiri Olsa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1347296189.2124.31.camel@twins \
    --to=a.p.zijlstra@chello.nl \
    --cc=acme@ghostprotocols.net \
    --cc=fweisbec@gmail.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulus@samba.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox