linux-perf-users.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Ahern <daahern@cisco.com>
To: linux-perf-users@vger.kernel.org
Cc: David Ahern <daahern@cisco.com>
Subject: [PATCH] perf symbols: skip duplicate check in dso__load by guest kmod origin
Date: Sun, 21 Nov 2010 07:50:41 -0700	[thread overview]
Message-ID: <1290351041-4083-1-git-send-email-daahern@cisco.com> (raw)

If machine is not set root_dir is set to "" which drops name to the
same lookup as DSO__ORIG_DSO.

Signed-off-by: David Ahern <daahern@cisco.com>

diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index b39f499..d30136e 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -1473,10 +1473,10 @@ int dso__load(struct dso *self, struct map *map, symbol_filter_t filter)
 			snprintf(name, size, "%s", self->long_name);
 			break;
 		case DSO__ORIG_GUEST_KMODULE:
-			if (map->groups && map->groups->machine)
-				root_dir = map->groups->machine->root_dir;
-			else
-				root_dir = "";
+			if (!map->groups || !map->groups->machine)
+				continue;
+
+			root_dir = map->groups->machine->root_dir;
 			snprintf(name, size, "%s%s", root_dir, self->long_name);
 			break;
 
-- 
1.7.2.3

                 reply	other threads:[~2010-11-21 14:50 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1290351041-4083-1-git-send-email-daahern@cisco.com \
    --to=daahern@cisco.com \
    --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).