All of lore.kernel.org
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Ilya Leoshkevich <iii@linux.ibm.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>,
	linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
	Heiko Carstens <hca@linux.ibm.com>,
	Vasily Gorbik <gor@linux.ibm.com>,
	Alexander Gordeev <agordeev@linux.ibm.com>
Subject: Re: [PATCH 4/5] perf test java symbol: Fix a false negative in symbol regex
Date: Thu, 6 Nov 2025 18:08:57 -0800	[thread overview]
Message-ID: <aQ1UuVQdjZa7HYOF@google.com> (raw)
In-Reply-To: <20251105191626.34998-5-iii@linux.ibm.com>

On Wed, Nov 05, 2025 at 08:10:27PM +0100, Ilya Leoshkevich wrote:
> There are a lot of symbols like InterpreterRuntime::resolve_get_put()
> in the perf report output, so the existing regex unfortunately always
> matches something. Replace it with a more precise one.
> 
> Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
> ---
>  tools/perf/tests/shell/test_java_symbol.sh | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/perf/tests/shell/test_java_symbol.sh b/tools/perf/tests/shell/test_java_symbol.sh
> index f36c9321568c5..4c6bc57b87181 100755
> --- a/tools/perf/tests/shell/test_java_symbol.sh
> +++ b/tools/perf/tests/shell/test_java_symbol.sh
> @@ -55,8 +55,10 @@ fi
>  # Below is an example of the instruction samples reporting:
>  #   8.18%  jshell           jitted-50116-29.so    [.] Interpreter
>  #   0.75%  Thread-1         jitted-83602-1670.so  [.] jdk.internal.jimage.BasicImageReader.getString(int)
> +# Look for them, while avoiding false positives from lines like this:
> +#   0.03%  jshell           libjvm.so             [.] InterpreterRuntime::resolve_get_put(JavaThread*, Bytecodes::Code)
>  perf report --stdio -i "$PERF_INJ_DATA" 2>&1 |
> -	grep -E " +[0-9]+\.[0-9]+% .* (Interpreter|jdk\.internal).*" >/dev/null 2>&1
> +	grep ' jshell .* jitted-.*\.so .* \(Interpreter$\|jdk\.internal\)' &>/dev/null

Maybe 'jshell' part can go away as well.. but it's up to you. :)

Thanks,
Namhyung

>  
>  if [ $? -ne 0 ]; then
>  	echo "Fail to find java symbols"
> -- 
> 2.51.1
> 

  reply	other threads:[~2025-11-07  2:08 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-05 19:10 [PATCH 0/5] perf jitdump: Fix PID namespace detection Ilya Leoshkevich
2025-11-05 19:10 ` [PATCH 1/5] " Ilya Leoshkevich
2025-11-07  2:16   ` Namhyung Kim
2025-11-07  8:19     ` Ilya Leoshkevich
2025-11-14  8:07       ` Namhyung Kim
2025-11-14 12:44         ` Ilya Leoshkevich
2025-11-14 18:44           ` Namhyung Kim
2025-11-05 19:10 ` [PATCH 2/5] perf test java symbol: Get rid of shellcheck warnings Ilya Leoshkevich
2025-11-07  2:07   ` Namhyung Kim
2025-11-07  7:57     ` Ilya Leoshkevich
2025-11-05 19:10 ` [PATCH 3/5] perf test java symbol: Extract LIBJVMTI detection Ilya Leoshkevich
2025-11-05 19:10 ` [PATCH 4/5] perf test java symbol: Fix a false negative in symbol regex Ilya Leoshkevich
2025-11-07  2:08   ` Namhyung Kim [this message]
2025-11-07  7:59     ` Ilya Leoshkevich
2025-11-05 19:10 ` [PATCH 5/5] perf test java symbol: Add PID namespace variant Ilya Leoshkevich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aQ1UuVQdjZa7HYOF@google.com \
    --to=namhyung@kernel.org \
    --cc=acme@kernel.org \
    --cc=agordeev@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=iii@linux.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.