Skip to content

TEZ-4740: Fix typo in ProfileServlet javadoc for method profiling - #525

Merged
abstractdog merged 1 commit into
apache:masterfrom
Aggarwal-Raghav:TEZ-4740
Jul 20, 2026
Merged

TEZ-4740: Fix typo in ProfileServlet javadoc for method profiling#525
abstractdog merged 1 commit into
apache:masterfrom
Aggarwal-Raghav:TEZ-4740

Conversation

@Aggarwal-Raghav

@Aggarwal-RaghavAggarwal-Raghav commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

Method profiling is still supported in newer versions of async-profiler (including 3.x and 4.x),
but it is accessed via the '-e' flag instead of '-m' in the backend. Admins can continue to use
the '?method=' HTTP query parameter for method profiling. This commit simply updates the Javadoc
to reflect the correct async-profiler flag, while leaving the existing method profiling functionality
intact.

@tez-yetus

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeLogfileComment
+0 🆗reexec2m 22sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+0 🆗detsecrets0m 0sdetect-secrets was not available.
+1 💚@author0m 0sThe patch does not contain any @author tags.
-1 ❌test4tests0m 0sThe patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ master Compile Tests _
+1 💚mvninstall3m 2smaster passed
+1 💚compile2m 35smaster passed
+1 💚checkstyle0m 21smaster passed
+1 💚javadoc0m 19smaster passed
+0 🆗spotbugs0m 35stez-common in master has 13 extant spotbugs warnings.
_ Patch Compile Tests _
+1 💚mvninstall2m 11sthe patch passed
+1 💚codespell0m 48sNo new issues.
+1 💚compile2m 34sthe patch passed
+1 💚javac2m 34sthe patch passed
+1 💚blanks0m 0sThe patch has no blanks issues.
+1 💚checkstyle0m 16sthe patch passed
+1 💚javadoc0m 18sthe patch passed
+1 💚spotbugs0m 39sthe patch passed
_ Other Tests _
-1 ❌unit60m 4s/patch-unit-root.txtroot in the patch passed.
+1 💚asflicense0m 20sThe patch does not generate ASF License warnings.
77m 28s
ReasonTests
Failed junit teststez.history.TestHistoryParser
SubsystemReport/Notes
DockerClientAPI=1.55 ServerAPI=1.55 base: https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-525/1/artifact/out/Dockerfile
Optional Testsdupname compile unit asflicense javac javadoc spotbugs checkstyle codespell detsecrets
unameLinux 33b347b5c041 5.15.0-181-generic #191-Ubuntu SMP Fri May 22 19:09:02 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitytez-personality.sh
git revisionmaster / b9d8c0f
Default JavaEclipse Adoptium-21.0.11+10-LTS
Test Resultshttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-525/1/testReport/
Max. process+thread count1565 (vs. ulimit of 5500)
modulesC: tez-common U: tez-common
Console outputhttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-525/1/console
versionsgit=2.43.0 maven=3.9.15 spotbugs=4.9.3 codespell=2.4.1
Powered byApache Yetus 0.15.1 https://yetus.apache.org

This message was automatically generated.

@Aggarwal-Raghav

Copy link
Copy Markdown
ContributorAuthor

@abstractdog , I verified that the ?method= parameter was maping to the -e flag and successfully generates FlameGraphs for that method in the async-profiler 4.4 i.e. latest

As per async-profiler readme:
https://github.com/async-profiler/async-profiler/blob/master/docs/ProfilingModes.md#java-method-profiling

-e ClassName.methodName option instruments the given Java method in order to record all invocations of this method with the stack traces.

I have a question, do we want to stop this method level profiling if yes then this PR is correct otherwise,
Do you want to keep the feature, cancel TEZ-4740, and just fix the comment typo from -m to -e flag?

BEFORE:
Screenshot 2026-07-19 at 3 27 53 PM

Screenshot 2026-07-19 at 3 28 13 PM

AFTER:
Screenshot 2026-07-19 at 3 58 00 PM

Screenshot 2026-07-19 at 4 00 16 PM

@abstractdog

Copy link
Copy Markdown
Contributor

fix the comment typo from -m to -e flag

thanks @Aggarwal-Raghav for investigating this: I was worried that maybe async profiler dropped the support of profiling methods, however, if it works with the -e, we can simply fix the typo definitely! the goal is to be very clear about the fact that in newer async profiler versions, method profiling is possible via the -e option
feel free to rename Jira accordingly

@Aggarwal-Raghav

Copy link
Copy Markdown
ContributorAuthor

fix the comment typo from -m to -e flag

thanks @Aggarwal-Raghav for investigating this: I was worried that maybe async profiler dropped the support of profiling methods, however, if it works with the -e, we can simply fix the typo definitely! the goal is to be very clear about the fact that in newer async profiler versions, method profiling is possible via the -e option feel free to rename Jira accordingly

i think older also it was -e since 2.0 https://github.com/async-profiler/async-profiler/blob/v2.0/README.md#java-method-profiling

So, now I'll rename this ticket to update the javadoc only and update the path to only support for 4.4 and drop support for 3.x?

/**
* Get the path of the profiler script to be executed.
* Before async-profiler 3.0, the script was named profiler.sh, and after 3.0 it's bin/asprof
* @return
*/
privateStringgetProfilerScriptPath() {
PathdefaultPath = Paths.get(asyncProfilerHome + "/bin/asprof");
returnFiles.exists(defaultPath)? defaultPath.toString() : asyncProfilerHome + "/profiler.sh";
}

@abstractdog

Copy link
Copy Markdown
Contributor

fix the comment typo from -m to -e flag

thanks @Aggarwal-Raghav for investigating this: I was worried that maybe async profiler dropped the support of profiling methods, however, if it works with the -e, we can simply fix the typo definitely! the goal is to be very clear about the fact that in newer async profiler versions, method profiling is possible via the -e option feel free to rename Jira accordingly

i think older also it was -e since 2.0 https://github.com/async-profiler/async-profiler/blob/v2.0/README.md#java-method-profiling

So, now I'll rename this ticket to update the javadoc only and update the path to only support for 4.4 and drop support for 3.x?

/**
* Get the path of the profiler script to be executed.
* Before async-profiler 3.0, the script was named profiler.sh, and after 3.0 it's bin/asprof
* @return
*/
privateStringgetProfilerScriptPath() {
PathdefaultPath = Paths.get(asyncProfilerHome + "/bin/asprof");
returnFiles.exists(defaultPath)? defaultPath.toString() : asyncProfilerHome + "/profiler.sh";
}

I think dropping profile 3.x support is another thing to discuss, I'm fine with not doing it now

@Aggarwal-Raghav

Copy link
Copy Markdown
ContributorAuthor

fix the comment typo from -m to -e flag

thanks @Aggarwal-Raghav for investigating this: I was worried that maybe async profiler dropped the support of profiling methods, however, if it works with the -e, we can simply fix the typo definitely! the goal is to be very clear about the fact that in newer async profiler versions, method profiling is possible via the -e option feel free to rename Jira accordingly

i think older also it was -e since 2.0 https://github.com/async-profiler/async-profiler/blob/v2.0/README.md#java-method-profiling
So, now I'll rename this ticket to update the javadoc only and update the path to only support for 4.4 and drop support for 3.x?

/**
* Get the path of the profiler script to be executed.
* Before async-profiler 3.0, the script was named profiler.sh, and after 3.0 it's bin/asprof
* @return
*/
privateStringgetProfilerScriptPath() {
PathdefaultPath = Paths.get(asyncProfilerHome + "/bin/asprof");
returnFiles.exists(defaultPath)? defaultPath.toString() : asyncProfilerHome + "/profiler.sh";
}

I think dropping profile 3.x support is another thing to discuss, I'm fine with not doing it now

ACK

Method profiling is still supported in newer versions of async-profiler (including 3.x and 4.x),
but it is accessed via the '-e' flag instead of '-m' in the backend. Admins can continue to use
the '?method=' HTTP query parameter for method profiling. This commit simply updates the Javadoc
to reflect the correct async-profiler flag, while leaving the existing method profiling functionality
intact.
@Aggarwal-Raghav

Copy link
Copy Markdown
ContributorAuthor

So final behaviour:
http://localhost:50000/prof?event=cpu&duration=10

FOR CPU:
Screenshot 2026-07-20 at 4 20 10 PM
Screenshot 2026-07-20 at 4 20 46 PM

FOR METHOD:
Screenshot 2026-07-20 at 4 24 03 PM
Screenshot 2026-07-20 at 4 24 14 PM

@Aggarwal-RaghavAggarwal-Raghav changed the title TEZ-4740: Remove method parameter from ProfileServletTEZ-4740: Fix typo in ProfileServlet javadoc for method profilingJul 20, 2026
@tez-yetus

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeLogfileComment
+0 🆗reexec0m 7sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+0 🆗detsecrets0m 0sdetect-secrets was not available.
+1 💚@author0m 0sThe patch does not contain any @author tags.
-1 ❌test4tests0m 0sThe patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.
_ master Compile Tests _
+1 💚mvninstall3m 6smaster passed
+1 💚compile2m 29smaster passed
+1 💚checkstyle0m 21smaster passed
+1 💚javadoc0m 19smaster passed
+0 🆗spotbugs0m 35stez-common in master has 13 extant spotbugs warnings.
_ Patch Compile Tests _
+1 💚mvninstall2m 10sthe patch passed
+1 💚codespell0m 50sNo new issues.
+1 💚compile2m 29sthe patch passed
+1 💚javac2m 29sthe patch passed
+1 💚blanks0m 0sThe patch has no blanks issues.
+1 💚checkstyle0m 17sthe patch passed
+1 💚javadoc0m 19sthe patch passed
+1 💚spotbugs0m 40sthe patch passed
_ Other Tests _
+1 💚unit60m 23sroot in the patch passed.
+1 💚asflicense0m 22sThe patch does not generate ASF License warnings.
75m 28s
SubsystemReport/Notes
DockerClientAPI=1.55 ServerAPI=1.55 base: https://ci-hadoop.apache.org/job/tez-multibranch/job/PR-525/2/artifact/out/Dockerfile
Optional Testsdupname compile unit asflicense javac javadoc spotbugs checkstyle codespell detsecrets
unameLinux b09575a92cc4 5.15.0-181-generic #191-Ubuntu SMP Fri May 22 19:09:02 UTC 2026 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitytez-personality.sh
git revisionmaster / b9d8c0f
Default JavaEclipse Adoptium-21.0.11+10-LTS
Test Resultshttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-525/2/testReport/
Max. process+thread count1497 (vs. ulimit of 5500)
modulesC: tez-common U: tez-common
Console outputhttps://ci-hadoop.apache.org/job/tez-multibranch/job/PR-525/2/console
versionsgit=2.43.0 maven=3.9.15 spotbugs=4.9.3 codespell=2.4.1
Powered byApache Yetus 0.15.1 https://yetus.apache.org

This message was automatically generated.

@abstractdog
abstractdog self-requested a review July 20, 2026 15:28
@abstractdog
abstractdog merged commit 0f389d2 into apache:masterJul 20, 2026
6 checks passed
@abstractdog

Copy link
Copy Markdown
Contributor

LGTM

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@Aggarwal-Raghav@tez-yetus@abstractdog