Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751876Ab1EJSxR (ORCPT ); Tue, 10 May 2011 14:53:17 -0400 Received: from outmail021.snc4.facebook.com ([66.220.144.153]:60544 "EHLO mx-out.facebook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750863Ab1EJSxP (ORCPT ); Tue, 10 May 2011 14:53:15 -0400 From: Arun Sharma To: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, acme@ghostprotocols.net Cc: Arun Sharma Subject: [PATCH] Add dso->deleted bit Date: Tue, 10 May 2011 11:51:47 -0700 Message-Id: <1305053507-28729-1-git-send-email-asharma@fb.com> X-Mailer: git-send-email 1.7.4 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1515 Lines: 54 This keeps the knowledge about deleted filenames in one place. Signed-off-by: Arun Sharma --- tools/perf/util/map.c | 1 + tools/perf/util/symbol.c | 2 +- tools/perf/util/symbol.h | 1 + 3 files changed, 3 insertions(+), 1 deletions(-) diff --git a/tools/perf/util/map.c b/tools/perf/util/map.c index a16ecab..042ba9f 100644 --- a/tools/perf/util/map.c +++ b/tools/perf/util/map.c @@ -135,6 +135,7 @@ int map__load(struct map *self, symbol_filter_t filter) "a debug package?\n", name); } + self->dso->deleted = 1; return -1; } /* diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c index 17df793..dbd1944 100644 --- a/tools/perf/util/symbol.c +++ b/tools/perf/util/symbol.c @@ -1575,7 +1575,7 @@ restart: } free(name); - if (ret < 0 && strstr(self->name, " (deleted)") != NULL) + if (ret < 0 && self->deleted) return 0; return ret; } diff --git a/tools/perf/util/symbol.h b/tools/perf/util/symbol.h index 713b0b4..943a054 100644 --- a/tools/perf/util/symbol.h +++ b/tools/perf/util/symbol.h @@ -142,6 +142,7 @@ struct dso { u8 annotate_warned:1; u8 sname_alloc:1; u8 lname_alloc:1; + u8 deleted:1; unsigned char symtab_type; u8 sorted_by_name; u8 loaded; -- 1.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/