From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CAD871A76D4 for ; Wed, 29 Jan 2025 11:11:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.49 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738149091; cv=none; b=FGF0OG2SQE6sW4+tfARND1++hcqf2BJ63ujyAYeJEJPrIhZbOCGDS1wC4j8z5tGH1uVLlbiNG8VAS1wiAbPJD6K8i033xmmDZmIVdnYZiXqlqc1yJGD1d2+4kNIDWbk9LYFov6uYXxaUe8D28f0MvaiLdPtIfPOR6YFY8U4SO4o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1738149091; c=relaxed/simple; bh=gya3ROjPc6Xcv9OxmCa/y0ywXdCeEgTScRlfInQVYQw=; h=Message-ID:Date:MIME-Version:Subject:From:To:Cc:References: In-Reply-To:Content-Type; b=XOK2kdTvaRaIy9eVSVK6Cn3B8YMj2uC9s6+Em8hJrEioSn2T6TiFPiWawbzRWxmU07LCy4zENp4F2j67E6xceXUbLlpJFetqXcLr80JQnhZ6W2Az+45JrUI9mYx91HWbhk8AKpaCLfSPBywqxAh1Y4yCdOj3KfCAMCLKswxCrgo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=WbkIt/Bo; arc=none smtp.client-ip=209.85.128.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="WbkIt/Bo" Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-436a03197b2so45516945e9.2 for ; Wed, 29 Jan 2025 03:11:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1738149088; x=1738753888; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:from:subject:user-agent:mime-version:date:message-id:from:to :cc:subject:date:message-id:reply-to; bh=qDBbwVh3J9uSm9rgekPSCuO+iinsLFNzIr1VWB6driQ=; b=WbkIt/BoEHjTpXW3OUNQxs5My8rt3Wkp0U+UR5qyDArYB/vVBAkWiVOAxTevgqTykO t1IxcQoQS0jJIdNoRBbHuhUE08cRFGCVDMsMv87olZAwIMsm/57Y1L3/aRU7bJGUMxRy 61i25CWDqxrgERJ40My7JKd6rXFMLNHgVLIY2nf1YVGuclaHZCzIXWVaRBrNox8X7PYP PB7VUExOpUsDWn1rRn0W4SsuVWOWlo6L8x/xIqVktAOdrb2Y8CR+yoY9GnHYeY93RHy7 6yQTWKHRJuTNdMEFtiZnVsjnGbH+m/ktyIBTvE07QzwoELWN6rt4iXD+SWg9e8evuI5/ hsaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1738149088; x=1738753888; h=content-transfer-encoding:in-reply-to:content-language:references :cc:to:from:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=qDBbwVh3J9uSm9rgekPSCuO+iinsLFNzIr1VWB6driQ=; b=I3+scTLurJaH/6bxPQQj9qvzQQvC3mVJ0UaDaYlAd/6P31oF/aRrz8P50dWyu59beX cMR8Sw7sewbZu83JecfqruMf+B0GjIMajw5kwmDcxPHu8FVp46kB5O5N2GZcZAIwV8m8 B+TATZdIad7OyAzfwWJk+on3/BYCwMfdkBrU4jL17ZoucBfP5Bmn3Q4oth9jKCGhA1fb SE2DWvbRr86qvrPqh0vwf6Hkgl3yG/qmeg/o4nrxieLL6V+yLVdfA56Pn80nfOMeUYVP Xlnz491hCiM/Rq4u8xJcGMgKRZvmq3rOMZYa+A0nsqy8rU1kuHM5iFQ+GeJ/34E/zrSL Wt/w== X-Forwarded-Encrypted: i=1; AJvYcCXJxNlN6jV/nTZWCf++vgoD3W2Z8yjZDvBSmaVRT+CVNg0MXoyisRYwaZxtmUQrNkShbiraIULVcGxC0yA=@vger.kernel.org X-Gm-Message-State: AOJu0YxJQgp2PLkyLKVR49NssoFB/+iD1M5kx4JIKKtELFSTaCQgVIW3 2epgJAMz3MCaLh9mizT0T5zo3bn3Jsytaavl1Jg9jmw4lsFeyasIsYKCuzqG0c0= X-Gm-Gg: ASbGncsjJ0u01C6t+GKIIsjUb+jZAeftSd7GCApqVHsNL9pNPzF6jxGxEnv3vj9N/0g 1SUYp/rYsvxDqcbHk09QmUT2CVbVtRm4j6X6ui7ayMP1t04SoTg+50ieFd7zKAdihr7TvM9hikB 5kUaMICj6SFvkeY6n54cdNKDumTyZpFYJxB9sK3xxJn8tXnZiSCiIrPODFLMDlsGIgkG3dE7VJp wiLhIJq11cClQk9pxqkv2Uq8df5EwqWhU3qd2gUd+5Ph6RQ+b3qvmWer1ohQuDrukkLchGyZKIH mqPsxBiaWgpr6xoBzbMyBFm+yA== X-Google-Smtp-Source: AGHT+IG5+JkKOc+EXDV/Cw7kZ6DmBAfY+BlQJGrRo97tUXfJxB0XIVUewg0H3IiXe4E/hgTqL/ZbHw== X-Received: by 2002:a05:600c:1f15:b0:434:f335:83b with SMTP id 5b1f17b1804b1-438dc3a84aamr23697505e9.5.1738149087917; Wed, 29 Jan 2025 03:11:27 -0800 (PST) Received: from [192.168.68.163] ([145.224.90.107]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-438dcc2a8e9sm18713315e9.18.2025.01.29.03.11.26 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 29 Jan 2025 03:11:27 -0800 (PST) Message-ID: Date: Wed, 29 Jan 2025 11:11:26 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/2 v2] perf test: Fix perf test 114 perf record test subtest precise_max for s390 From: James Clark To: Thomas Richter , namhyung@kernel.org Cc: agordeev@linux.ibm.com, gor@linux.ibm.com, sumanthk@linux.ibm.com, hca@linux.ibm.com, linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org, acme@kernel.org References: <20250129071134.4024430-1-tmricht@linux.ibm.com> <30865b2c-c58d-4974-9a88-dc13b8ad1195@linaro.org> Content-Language: en-US In-Reply-To: <30865b2c-c58d-4974-9a88-dc13b8ad1195@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit On 29/01/2025 9:57 am, James Clark wrote: > > Is this a v2 of "[PATCH] perf test: Fix perf test 114 perf record test > for s390"? Or maybe the v2 is a typo? > Nevermind, the CC list is different on the two patches that's why I got confused. > On 29/01/2025 7:11 am, Thomas Richter wrote: >> On s390 the event instructions can not be used for recording. >> This event is only supported by perf stat. >> >> Change the event instruction to cycles for subtest test_precise_max >> as suggested by James Clark. >> >> Signed-off-by: Thomas Richter >> Suggested-by: James Clark >> --- >>   tools/perf/tests/shell/record.sh | 4 ++-- >>   1 file changed, 2 insertions(+), 2 deletions(-) >> >> diff --git a/tools/perf/tests/shell/record.sh b/tools/perf/tests/ >> shell/record.sh >> index 0fc7a909ae9b..957ee10aff44 100755 >> --- a/tools/perf/tests/shell/record.sh >> +++ b/tools/perf/tests/shell/record.sh >> @@ -287,9 +287,9 @@ test_precise_max() { >>       return >>     fi >>     # On AMD, cycles and instructions events are treated differently >> -  if ! perf record -o "${perfdata}" -e "instructions:P" true 2> /dev/ >> null >> +  if ! perf record -o "${perfdata}" -e "cycles:P" true 2> /dev/null > > I'm not sure if this is the right fix. Doesn't this make the test test > cycles:P twice now? > > I think the fix is to first test if cycles can be sampled, then test > cycles:P. Then test if instructions can be sampled, then test > instructions:P. > > At the moment it checks the events with perf stat, and it checks them > both at the same time. Obviously that doesn't work if an event works for > perf stat but not perf record. And checking them both at the same time > doesn't allow for one existing and not the other. > >>     then >> -    echo "precise_max attribute [Failed instructions:P event]" >> +    echo "precise_max attribute [Failed cycles:P event]" >>       err=1 >>       return >>     fi >