Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp949855iob; Fri, 13 May 2022 17:27:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwQY7AXDNkcTunfy3BrpIUAR9X5GC2g+Fgn9oNuGm23tooUloyL9PuEB90omp1hSgMVtYMH X-Received: by 2002:a05:600c:3503:b0:394:8382:9fda with SMTP id h3-20020a05600c350300b0039483829fdamr17242351wmq.0.1652488058244; Fri, 13 May 2022 17:27:38 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652488058; cv=none; d=google.com; s=arc-20160816; b=t8jIBByNK+Pxa+UFd0oMklkdwfs29SG6UhSd6Ho0Kc0O++OPGh3B/1Rsl0hH6LU9u5 EYX9JbXKQN59TXTtZ3bJ/JMBPFxSrW8DW49ZzzOXDKIo1T2cspU5Dw8l+ksvwV4Hh0s5 uWFV6dnzCWpfEPA48B37WOXNFAhszlbngkijjnXQp1mta4M19TF9dLyHGZ54FirrPvdG jNmfMjBzcsOfquBlBbu9ZS3YwIJZN/yBCg2MbefbqbY1O+lkVQJQqN353YwNssfZaesK 05nHzZoRvCc8YRpODzmPrDOMbIQi9+Gu5go+uziabeZyxrlMlaQ8PlBrRJiVr4WaBNQt zSTA== 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:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=h931KEXdq60apHYsY1eE8nwiZL5cBesqQZPvcd8OBNc=; b=Oa08GjFBdXZBTMs7Bzj0PHOqb6nR/ld/5W4T2Soxbb9h0V/Osu+myIZ9oOxByzkUlT eqi+113tCaBP8LzCi9OGyAsYdCMbkOXQMu4MLuh2bshfvNpReAMfNoxsyNcr55Hvc4XV OAq8Q9pV9Ae4F9uXaRdzDkS9S7Gx8kgTIP8xa/zKtkhLBQUBgJPno58yLxvEsAgmw/V1 WD+d4TMqmqg+37UEapyYxQbwb/AMjqDIH9sK9uQG9zRty2oLwu26X8uEPUJK1ye3tsGW KyPPNrd+yqrnNYZm+gWv9s/Stv5DG+sfO1ZgzRDk9DXqqoIxHYzLFz2qmQ//aes7Xbbz XsfQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="B9N4j/68"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id d9-20020a1c7309000000b00394903b6653si3398482wmb.163.2022.05.13.17.27.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 13 May 2022 17:27:38 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="B9N4j/68"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 3EC2D2F8CDE; Fri, 13 May 2022 16:20:33 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1378872AbiEMJDM (ORCPT + 99 others); Fri, 13 May 2022 05:03:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378828AbiEMJDG (ORCPT ); Fri, 13 May 2022 05:03:06 -0400 Received: from mga06.intel.com (mga06b.intel.com [134.134.136.31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C315994E9; Fri, 13 May 2022 02:03:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1652432584; x=1683968584; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4u7kPxkI+qIYW7/lB1AUNG4A0JsQhATwJmmL079dvs4=; b=B9N4j/68B6/aArFPSvwQlqTRgPbQ4qgpuhJU8fj1Dy/YI2VUIEZlBz7h UkO1+izhodQddLhvlYMWg6a1yffrnVBPWpmpRuCc3haPmXS1U/hUF39u2 QpgpoqfXgNNH0p2rMDONWlKLRR5oEAd+oz+TkbYMhoY6E27aMwf8zBNAv s1XKAbfhPuYuqK7jscSjv/Oee25VQ7xHDQIQtogYemc/DQfvgcoToDHPY o9dQDli9/8SNafjKEK8ZyjaB7C0AuiyUqIDZ+4xmai4abD+Wu+/7UVxba plLv95LN4tQbjhKN956xVSZpoZAJpAXFY3lGw23wuXpZQhaLmDtoFqDKa A==; X-IronPort-AV: E=McAfee;i="6400,9594,10345"; a="330856492" X-IronPort-AV: E=Sophos;i="5.91,221,1647327600"; d="scan'208";a="330856492" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 May 2022 02:03:04 -0700 X-IronPort-AV: E=Sophos;i="5.91,221,1647327600"; d="scan'208";a="595129665" Received: from ahunter6-mobl1.ger.corp.intel.com (HELO ahunter-VirtualBox.home\044ger.corp.intel.com) ([10.252.36.190]) by orsmga008-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 13 May 2022 02:03:01 -0700 From: Adrian Hunter To: Arnaldo Carvalho de Melo Cc: Jiri Olsa , Namhyung Kim , Ian Rogers , Leo Yan , linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, kvm@vger.kernel.org Subject: [PATCH 4/6] perf script: Add guest_code support Date: Fri, 13 May 2022 12:02:35 +0300 Message-Id: <20220513090237.10444-5-adrian.hunter@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220513090237.10444-1-adrian.hunter@intel.com> References: <20220513090237.10444-1-adrian.hunter@intel.com> 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=-2.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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: X-Mailing-List: linux-kernel@vger.kernel.org Add an option to indicate that guest code can be found in the hypervisor process. Signed-off-by: Adrian Hunter --- tools/perf/Documentation/perf-script.txt | 4 ++++ tools/perf/builtin-script.c | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/tools/perf/Documentation/perf-script.txt b/tools/perf/Documentation/perf-script.txt index 2012a8e6c90b..1a557ff8f210 100644 --- a/tools/perf/Documentation/perf-script.txt +++ b/tools/perf/Documentation/perf-script.txt @@ -499,6 +499,10 @@ include::itrace.txt[] The known limitations include exception handing such as setjmp/longjmp will have calls/returns not match. +--guest-code:: + Indicate that guest code can be found in the hypervisor process, + which is a common case for KVM test programs. + SEE ALSO -------- linkperf:perf-record[1], linkperf:perf-script-perl[1], diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index cf5eab5431b4..96a2106a3dac 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c @@ -3884,6 +3884,8 @@ int cmd_script(int argc, const char **argv) "file", "file saving guest os /proc/kallsyms"), OPT_STRING(0, "guestmodules", &symbol_conf.default_guest_modules, "file", "file saving guest os /proc/modules"), + OPT_BOOLEAN(0, "guest-code", &symbol_conf.guest_code, + "Guest code can be found in hypervisor process"), OPT_BOOLEAN('\0', "stitch-lbr", &script.stitch_lbr, "Enable LBR callgraph stitching approach"), OPTS_EVSWITCH(&script.evswitch), @@ -3909,7 +3911,8 @@ int cmd_script(int argc, const char **argv) if (symbol_conf.guestmount || symbol_conf.default_guest_vmlinux_name || symbol_conf.default_guest_kallsyms || - symbol_conf.default_guest_modules) { + symbol_conf.default_guest_modules || + symbol_conf.guest_code) { /* * Enable guest sample processing. */ -- 2.25.1