Received: by 2002:a05:7412:cfc7:b0:fc:a2b0:25d7 with SMTP id by7csp1517226rdb; Mon, 19 Feb 2024 20:30:33 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUGxga6cuITANdoydL4ylwQ7ML7UkR58cbjklh0mbpIjmkWYpf/Ir2DVLo2wkFfz1LUgg6KTXqHEm3AD34mzmladYZ8sNnGkWUrVKayHg== X-Google-Smtp-Source: AGHT+IHsKxX3JtOFh92sxQwzjJiNUZ6EhemvSUUFEGOSIwmHZuLclsKc21V469l7vpfk63WiK0qG X-Received: by 2002:a05:6a20:2d2b:b0:19e:985c:c019 with SMTP id g43-20020a056a202d2b00b0019e985cc019mr21169171pzl.47.1708403432885; Mon, 19 Feb 2024 20:30:32 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708403432; cv=pass; d=google.com; s=arc-20160816; b=EZ+OTvhHnMgpar0q40Yg99JH6FwkihsgzdTbbBNC91+v+qAJPQ392eGGfa30W3NpKK nuAqZoUPrUiS5Gf/QVmphf/ZFoPzsoV9o/Ab4Z+x8MkcnHXrosk0yPREXPnO3bSuNdQN vVKNm1WfHnIyJgyMYEM2S+EWhB5ORQCy0bAOXyfrmdFcI9z+eidOnPt4ZJbhn3sWvgno XohIOz/DCFaS/2XFvwIazlKWfdeO7yzzximMe5fGUVBl3/axp2McwyOJqHu99VHp8Xyt nm56LlM7N3ap2E+AIp4TamxG2ZYZ0lTz2qroLja3FB9FlBUIfsPeNfhr3yx+PhhHMWmX A9Ow== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=YlD1nGvN0PhZhNp1u4zlS88JNXdB5479bDgKz6ZZPk8=; fh=U7NWJgFYt/NrIAUDv9NBVBiY411JZlRQ6Hw9AaA6fRg=; b=IvFsxqI4W3J9XlAo0Ys0JRFRf6O/fZk6qV3bUw+INgvlN2XQnNR267hhYA54W/vc3s /hejELsAIRQnpd3MbQdF0H/EorrXRGID+bSTLp6LTfgpHcYbW1gDoOnZ1jSBOXbPGqV6 fSYXc6dgHHuNocIRfDe8ghwsne/QMzRZtGPpTYwJd74mvW4sNDfVHSzFJfwG9Yi7Hl65 lrQ06R8xbR1SSXYvbVeR35OuLHeZDN+qZeuYRy9fpWTeqFWr66ttKgKGaSBC1R6lquZE 5vxhQEYe9MmDMwmFrhS3kmYpiTmw3wLA/cvWiahXie1vCyLWv0OeW4yWQvBJXMB18bLl tZSg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-72318-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-72318-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id u4-20020a62d444000000b006e0901330e8si5157780pfl.368.2024.02.19.20.30.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 20:30:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-72318-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=arm.com dmarc=pass fromdomain=arm.com); spf=pass (google.com: domain of linux-kernel+bounces-72318-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-72318-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 43055283EF3 for ; Tue, 20 Feb 2024 04:30:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D4DDE56453; Tue, 20 Feb 2024 04:30:23 +0000 (UTC) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E6BB7365; Tue, 20 Feb 2024 04:30:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708403423; cv=none; b=uWGMPW013sIx6OYatnvKD1mIpqZ3YLQTiGmp/r0EdUNLdAigVPQnag9Tf+mWUPTfIfhqaPVa+0+l5e+vYh3Y7FzZdsQn/SOBTQ2h3q5xSkf52uf6kX3nFriA/h2+l9huJNp3h4MPPEwqwUzbvil+fd7kQ446KrHlVaP2GE+uDW4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708403423; c=relaxed/simple; bh=mq5mrVpVyAOV28vf8AdIRYf3Jzv4NPm8VDU3ouFB9LM=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Type; b=SRSAJ9t6FcLdDCAWchChXNWTn2YsF7ysHmtREdcfmglwfuy1ttvlUS71mQywDWQXKRoxUIw2gw1tGvldMkIORxZF8CdCDoTZgyefxFQjB7PTb3sJO872nshipIsWTBWC09xtg8pMEoiaD9L4fTqF0cM9daS5I6qPqHLuVCN6aaQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 0BDA7FEC; Mon, 19 Feb 2024 20:30:59 -0800 (PST) Received: from a079740.blr.arm.com (a079740.arm.com [10.162.43.11]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 617253F762; Mon, 19 Feb 2024 20:30:14 -0800 (PST) From: Chaitanya S Prakash To: linux-perf-users@vger.kernel.org Cc: anshuman.khandual@arm.com, Chaitanya S Prakash , Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Namhyung Kim , Mark Rutland , Alexander Shishkin , Jiri Olsa , Ian Rogers , Adrian Hunter , James Clark , =?UTF-8?q?Georg=20M=C3=BCller?= , Masami Hiramatsu , Liam Howlett , Athira Rajeev , linux-kernel@vger.kernel.org Subject: [PATCH 0/3] perf tools: Fix test "perf probe of function from different CU" Date: Tue, 20 Feb 2024 09:59:54 +0530 Message-Id: <20240220042957.2022391-1-ChaitanyaS.Prakash@arm.com> X-Mailer: git-send-email 2.34.1 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Chaitanya S Prakash Defconfig doesn't provide all the necessary configs required for the test "perf probe of function from different CU" to run successfully on all platforms. Therefore the required configs have been added to config fragments to resolve this issue. On further investigation it was seen that the Perf treated all files beginning with "/tmp/perf-" as a map file despite them always ending in ".map", this caused the test to fail when Perf was built with NO_DWARF=1. As the file was parsed as a map file, the probe...--funcs command output garbage values instead of listing the functions in the binary. After fixing the issue an additional check to test the output of the probe...--funcs command has been added. This patch series has been tested on 6.8-rc3 mainline kernerl, both on arm64 and x86 platforms. Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Arnaldo Carvalho de Melo Cc: Namhyung Kim Cc: Mark Rutland Cc: Alexander Shishkin Cc: Jiri Olsa Cc: Ian Rogers Cc: Adrian Hunter Cc: James Clark Cc: Georg Müller Cc: Masami Hiramatsu Cc: Liam Howlett Cc: Athira Rajeev Cc: linux-perf-users@vger.kernel.org Cc: linux-kernel@vger.kernel.org Chaitanya S Prakash (3): perf tools: Enable configs required for test_uprobe_from_different_cu.sh perf tools: Only treat files as map files when they have the extension .map perf test: Check output of the probe ... --funcs command tools/perf/builtin-script.c | 15 +-------------- tools/perf/tests/config-fragments/config | 3 +++ .../shell/test_uprobe_from_different_cu.sh | 2 +- tools/perf/util/string.c | 18 ++++++++++++++++++ tools/perf/util/string2.h | 1 + tools/perf/util/symbol.c | 5 ++++- 6 files changed, 28 insertions(+), 16 deletions(-) -- 2.34.1