Message ID | 20230120123456.12449-1-adrian.hunter@intel.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp172483wrn; Fri, 20 Jan 2023 04:35:51 -0800 (PST) X-Google-Smtp-Source: AMrXdXtq9LSp2/dT8pivbKBTspDVVXW9blKX4V+jKG9z6Jy1dOGUw7OHOCIktMOJrFfzh0kZTyyM X-Received: by 2002:a17:907:c5c6:b0:877:8a55:2a26 with SMTP id ts6-20020a170907c5c600b008778a552a26mr3892026ejc.60.1674218151465; Fri, 20 Jan 2023 04:35:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674218151; cv=none; d=google.com; s=arc-20160816; b=G3WdvYgZIHpgUu6GHWsMMrJ9/jAIvQB465RWrwrvmOQc8NnV09xmuxkLG+XyIIXFV4 tHdzkb9OE40Zl/heWKCkL/xdzDd+XCEQGyWYEeQJ0YUxxC82UaART1yJrr1GQOW1f4GB tqGUk987eaTJ9Q1nyq7Y5kMfsi3lovAXzTLzPzZYVQWe5unZ+E1Dhwdu42pYbc1plt72 RltYmjRVyFXTG4vVthqBACgmo77RUv1b2EWoWDJKqwQRnfNWTSxeL2ddgZnfs+dSMiRa lAtcLRYdtP6EX7sZHyq1EDtCAfrNUOkLkd6/CvfAqGCV23sQlwq/W+m5gs2L7/WAllXB wzgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:organization :mime-version:message-id:date:subject:cc:to:from:dkim-signature; bh=F7wNp2ogGoa6VzfloGDQHVZ5dH+BEDO8BbyCpjpB/4o=; b=VaugfTqQXjSKotC/hawle8jLhBYtERdKhzhVuB2b1zTo7ucjAJJYA4qdMBwYXGZa8r uggOKfBng3PNGdBHrac2nQin/6ZrcfTCa0iQNUtfZ7+KYc8tJUCeFm063v1hqj6n1sUK EeZmtljviOaRNiNJKrUc7YkzHLbVd3cxGpxzOyRenUJoQHasAgZKLQJYBrQgf63hqMt9 3iTQbWRS1adazq1StmL9EJqFm7nIxCI5LdGWXf5O7NRsaoO4OWncAFOGX9683jIujh+m 9yWjkIl48b/LbNLeAmjWRCkeQCbvfE77LMfrsGU3Q+q64RqMPcsluE2+jSA9+XOgcjb2 O6rQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="NFzk/2/r"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id ne29-20020a1709077b9d00b0086bd195adc0si26167002ejc.66.2023.01.20.04.35.28; Fri, 20 Jan 2023 04:35:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="NFzk/2/r"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230083AbjATMfR (ORCPT <rfc822;literming00@gmail.com> + 99 others); Fri, 20 Jan 2023 07:35:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58310 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229501AbjATMfP (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Fri, 20 Jan 2023 07:35:15 -0500 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40D2F2C656; Fri, 20 Jan 2023 04:35:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1674218114; x=1705754114; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=ylfnLKm49NlcEfamuoPXekX6Ok4LJGtizaJMBCvgD3E=; b=NFzk/2/r+qwJJyAnODlWm39f8ALYQmjaeEhQY7RnW1Se4vALu8m05wzm Nr4CT+yRzq5ngLEjq1YwCST5Fqz5zVBaL9cxnTPc8ZJzRjC5hA59PGxr+ LXuXor6N+XVnoPti2w1ZolsQ7AQ2TnLCHInf79W2PlOdaQC+7eo+NFfoS aeIev1/gTOokcXPQ1KqJ40HjhR3EignjJquFfyDlkOtTFdLIDB/oGC3jf zCtX+ktRpRX4jZTI8YPpQGVIuOXXZ64p0CuU5XzfCxDanRjlqg1hN6VVs ae8WdRKcXXrQcK6i1WP5yxc0hbTMe/hk9/KN8Q0Xh3s9nqjA6SShuIqLa g==; X-IronPort-AV: E=McAfee;i="6500,9779,10595"; a="387935132" X-IronPort-AV: E=Sophos;i="5.97,232,1669104000"; d="scan'208";a="387935132" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jan 2023 04:35:13 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10595"; a="692847411" X-IronPort-AV: E=Sophos;i="5.97,232,1669104000"; d="scan'208";a="692847411" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO ahunter-VirtualBox.home\044ger.corp.intel.com) ([10.251.223.163]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jan 2023 04:35:11 -0800 From: Adrian Hunter <adrian.hunter@intel.com> To: Arnaldo Carvalho de Melo <acme@kernel.org> Cc: Jiri Olsa <jolsa@redhat.com>, Namhyung Kim <namhyung@kernel.org>, Ian Rogers <irogers@google.com>, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org Subject: [PATCH 00/10] perf symbols: Improve dso__synthesize_plt_symbols() Date: Fri, 20 Jan 2023 14:34:46 +0200 Message-Id: <20230120123456.12449-1-adrian.hunter@intel.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Organization: Intel Finland Oy, Registered Address: PL 281, 00181 Helsinki, Business Identity Code: 0357606 - 4, Domiciled in Helsinki Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755544972455366873?= X-GMAIL-MSGID: =?utf-8?q?1755544972455366873?= |
Series |
perf symbols: Improve dso__synthesize_plt_symbols()
|
|
Message
Adrian Hunter
Jan. 20, 2023, 12:34 p.m. UTC
Hi This is the first of 2 patchsets to improve dso__synthesize_plt_symbols(). This patchset is really preparation for the 2nd patchset, which focuses on getting rid of unknown symbols that show up in Intel PT traces. The 2nd patchset is still under development. These patches are small and staightforward. Only the new Symbols test is slightly interesting because it provides a way to see what symbols perf discovers for any given dso. The test fails initially, but should pass after patch 7 "perf symbols: Add symbol for .plt header". Adrian Hunter (10): perf test: Add Symbols test perf symbols: Factor out get_plt_sizes() perf symbols: Check plt_entry_size is not zero perf symbols: Add dso__find_symbol_nocache() perf symbols: Slightly simplify 'err' usage in dso__synthesize_plt_symbols() perf symbols: Do not check ss->dynsym twice perf symbols: Add symbol for .plt header perf symbols: Allow for .plt entries with no symbol perf symbols: Combine handling for SHT_RELA and SHT_REL perf symbols: Check SHT_RELA and SHT_REL type earlier tools/perf/Documentation/perf-test.txt | 3 + tools/perf/tests/Build | 1 + tools/perf/tests/builtin-test.c | 3 + tools/perf/tests/symbols.c | 150 ++++++++++++++++++++++++++ tools/perf/tests/tests.h | 3 + tools/perf/util/symbol-elf.c | 190 +++++++++++++++++---------------- tools/perf/util/symbol.c | 5 + tools/perf/util/symbol.h | 1 + 8 files changed, 262 insertions(+), 94 deletions(-) create mode 100644 tools/perf/tests/symbols.c Regards Adrian
Comments
Em Fri, Jan 20, 2023 at 02:34:46PM +0200, Adrian Hunter escreveu: > Hi > > This is the first of 2 patchsets to improve dso__synthesize_plt_symbols(). > This patchset is really preparation for the 2nd patchset, which focuses > on getting rid of unknown symbols that show up in Intel PT traces. > The 2nd patchset is still under development. > > These patches are small and staightforward. Only the new Symbols test is > slightly interesting because it provides a way to see what symbols > perf discovers for any given dso. The test fails initially, but > should pass after patch 7 "perf symbols: Add symbol for .plt header". Looks nice, I've test build, one by one and used the test with a different --dso, etc. I'll keep it today locally for further container tests and to give time to others to look at it, I'll have it in tmp.perf/core soon. - Arnaldo > > Adrian Hunter (10): > perf test: Add Symbols test > perf symbols: Factor out get_plt_sizes() > perf symbols: Check plt_entry_size is not zero > perf symbols: Add dso__find_symbol_nocache() > perf symbols: Slightly simplify 'err' usage in dso__synthesize_plt_symbols() > perf symbols: Do not check ss->dynsym twice > perf symbols: Add symbol for .plt header > perf symbols: Allow for .plt entries with no symbol > perf symbols: Combine handling for SHT_RELA and SHT_REL > perf symbols: Check SHT_RELA and SHT_REL type earlier > > tools/perf/Documentation/perf-test.txt | 3 + > tools/perf/tests/Build | 1 + > tools/perf/tests/builtin-test.c | 3 + > tools/perf/tests/symbols.c | 150 ++++++++++++++++++++++++++ > tools/perf/tests/tests.h | 3 + > tools/perf/util/symbol-elf.c | 190 +++++++++++++++++---------------- > tools/perf/util/symbol.c | 5 + > tools/perf/util/symbol.h | 1 + > 8 files changed, 262 insertions(+), 94 deletions(-) > create mode 100644 tools/perf/tests/symbols.c > > > Regards > Adrian
On Fri, Jan 20, 2023 at 4:35 AM Adrian Hunter <adrian.hunter@intel.com> wrote: > > Hi > > This is the first of 2 patchsets to improve dso__synthesize_plt_symbols(). > This patchset is really preparation for the 2nd patchset, which focuses > on getting rid of unknown symbols that show up in Intel PT traces. > The 2nd patchset is still under development. > > These patches are small and staightforward. Only the new Symbols test is > slightly interesting because it provides a way to see what symbols > perf discovers for any given dso. The test fails initially, but > should pass after patch 7 "perf symbols: Add symbol for .plt header". > > > Adrian Hunter (10): > perf test: Add Symbols test > perf symbols: Factor out get_plt_sizes() > perf symbols: Check plt_entry_size is not zero > perf symbols: Add dso__find_symbol_nocache() > perf symbols: Slightly simplify 'err' usage in dso__synthesize_plt_symbols() > perf symbols: Do not check ss->dynsym twice > perf symbols: Add symbol for .plt header > perf symbols: Allow for .plt entries with no symbol > perf symbols: Combine handling for SHT_RELA and SHT_REL > perf symbols: Check SHT_RELA and SHT_REL type earlier Acked-by: Ian Rogers <irogers@google.com> Thanks, Ian > tools/perf/Documentation/perf-test.txt | 3 + > tools/perf/tests/Build | 1 + > tools/perf/tests/builtin-test.c | 3 + > tools/perf/tests/symbols.c | 150 ++++++++++++++++++++++++++ > tools/perf/tests/tests.h | 3 + > tools/perf/util/symbol-elf.c | 190 +++++++++++++++++---------------- > tools/perf/util/symbol.c | 5 + > tools/perf/util/symbol.h | 1 + > 8 files changed, 262 insertions(+), 94 deletions(-) > create mode 100644 tools/perf/tests/symbols.c > > > Regards > Adrian
Em Sat, Jan 21, 2023 at 09:53:53AM -0800, Ian Rogers escreveu: > On Fri, Jan 20, 2023 at 4:35 AM Adrian Hunter <adrian.hunter@intel.com> wrote: > > > > Hi > > > > This is the first of 2 patchsets to improve dso__synthesize_plt_symbols(). > > This patchset is really preparation for the 2nd patchset, which focuses > > on getting rid of unknown symbols that show up in Intel PT traces. > > The 2nd patchset is still under development. > > > > These patches are small and staightforward. Only the new Symbols test is > > slightly interesting because it provides a way to see what symbols > > perf discovers for any given dso. The test fails initially, but > > should pass after patch 7 "perf symbols: Add symbol for .plt header". > > > > > > Adrian Hunter (10): > > perf test: Add Symbols test > > perf symbols: Factor out get_plt_sizes() > > perf symbols: Check plt_entry_size is not zero > > perf symbols: Add dso__find_symbol_nocache() > > perf symbols: Slightly simplify 'err' usage in dso__synthesize_plt_symbols() > > perf symbols: Do not check ss->dynsym twice > > perf symbols: Add symbol for .plt header > > perf symbols: Allow for .plt entries with no symbol > > perf symbols: Combine handling for SHT_RELA and SHT_REL > > perf symbols: Check SHT_RELA and SHT_REL type earlier > Acked-by: Ian Rogers <irogers@google.com> Thanks, added to the tested patches, will push to perf/core shortly. - Arnaldo