linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
To: David Ahern <daahern@cisco.com>
Cc: linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3] perf tools: Add symfs option for off-box analysis using specified tree
Date: Tue, 14 Dec 2010 10:24:28 -0200	[thread overview]
Message-ID: <20101214122428.GA13425@ghostprotocols.net> (raw)
In-Reply-To: <1291926427-28846-1-git-send-email-daahern@cisco.com>

Em Thu, Dec 09, 2010 at 01:27:07PM -0700, David Ahern escreveu:
> The symfs argument allows analysis of perf.data file using a locally
> accessible filesystem tree with debug symbols - e.g., tree created
> during image builds, sshfs mount, loop mounted KVM disk images,
> USB keys, initrds, etc. Anything with an OS tree can be analyzed from
> anywhere without the need to populate a local data store with
> build-ids.
> 
> Signed-off-by: David Ahern <daahern@cisco.com>
> 
> v2 --> v3: handle symfs="/"

> @@ -2312,6 +2332,13 @@ int symbol__init(void)
>  		       symbol_conf.sym_list_str, "symbol") < 0)
>  		goto out_free_comm_list;
>  
> +	/* a path to symbols of "/" is identical to "" 
> +	 * reset here for simplicity.
> +	 */
> +	if ((symbol_conf.symfs[0] == '/') &&
> +	    (symbol_conf.symfs[1] == '\0'))
> +		symbol_conf.symfs = "";
> +
>  	symbol_conf.initialized = true;
>  	return 0;
>  

Call me a nitpicker:

[acme@felicio ~]$ cat realpath.c 
#include <limits.h>
#include <stdlib.h>

int main(int argc, char *argv[])
{
	char *resolved = realpath(argv[1], NULL);

	puts(resolved);
}
[acme@felicio ~]$ make realpath
cc     realpath.c   -o realpath
[acme@felicio ~]$ ./realpath //
/
[acme@felicio ~]$ ./realpath ////////////////
/
[acme@felicio ~]$ ./realpath /./././
/
[acme@felicio ~]$ ./realpath /..//.
/
[acme@felicio ~]$

I'll fix this up and merge, thanks!

- Arnaldo

  reply	other threads:[~2010-12-14 12:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-09 20:27 [PATCH v3] perf tools: Add symfs option for off-box analysis using specified tree David Ahern
2010-12-14 12:24 ` Arnaldo Carvalho de Melo [this message]
2010-12-14 12:52   ` Arnaldo Carvalho de Melo
2010-12-14 14:06     ` Arnaldo Carvalho de Melo
2010-12-14 14:33       ` David S. Ahern
2010-12-14 14:39         ` Arnaldo Carvalho de Melo
2010-12-14 14:27     ` David S. Ahern
2010-12-14 14:35       ` Arnaldo Carvalho de Melo

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=20101214122428.GA13425@ghostprotocols.net \
    --to=acme@ghostprotocols.net \
    --cc=daahern@cisco.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).