Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Print actual string arguments with -Xtrace (part 2) #20662

Merged

Conversation

h3110n3rv3
Copy link
Contributor

@h3110n3rv3 h3110n3rv3 commented Nov 21, 2024

The changes reflect the feature request #16416.

Adding cmdline option to specify string argument length.
-Xtrace:maxstringlength=[0-128]
maxstringlength takes an unsigned integer value from 0 to 128
If maxstringlength = 0 or unspecified, default to address printing.
Other invalid inputs result in the input error.

There will be subsequent PR for tests (part 3).

Signed-off-by: Nick Kamal <[email protected]>

@h3110n3rv3 h3110n3rv3 changed the title Feature request: Print actual String arguments with Xtrace part 1 Feature request: Print actual String arguments with Xtrace part 2 Nov 21, 2024
@h3110n3rv3
Copy link
Contributor Author

@TobiAjila could you please review for comments/concerns/feedback? Thanks

@h3110n3rv3 h3110n3rv3 changed the title Feature request: Print actual String arguments with Xtrace part 2 WIP: Feature request: Print actual String arguments with Xtrace part 2 Nov 21, 2024
@h3110n3rv3 h3110n3rv3 changed the title WIP: Feature request: Print actual String arguments with Xtrace part 2 WIP: Print actual String arguments with Xtrace part 2 Nov 25, 2024
@h3110n3rv3 h3110n3rv3 changed the title WIP: Print actual String arguments with Xtrace part 2 WIP: Print actual string arguments with -Xtrace (part 2) Nov 28, 2024
@h3110n3rv3 h3110n3rv3 force-pushed the Feature-request-16416-part2 branch 3 times, most recently from 6f968b4 to 2a77535 Compare November 28, 2024 12:56
#define RAS_STACKDEPTH_KEYWORD "STACKDEPTH"
#define RAS_SLEEPTIME_KEYWORD "SLEEPTIME"
#define RAS_COMPRESSION_LEVEL_KEYWORD "STACKCOMPRESSIONLEVEL"
#define RAS_METHOD_STRING_LENGTH_KEYWORD "METHODSTRARGLEN"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe "MAXSTRINGLENGTHINMETHODPARAMETER"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

then RAS_MAX_STRING_LENGTH_IN_METHOD_PARAMTER

@tajila tajila requested a review from keithc-ca December 4, 2024 16:24
@tajila
Copy link
Contributor

tajila commented Dec 4, 2024

@keithc-ca Please review these changes

runtime/rastrace/j9rastrace.h Outdated Show resolved Hide resolved
runtime/rastrace/j9rastrace.h Outdated Show resolved Hide resolved
runtime/rastrace/j9rastrace.h Outdated Show resolved Hide resolved
runtime/oti/j9trace.h Outdated Show resolved Hide resolved
runtime/rastrace/method_trigger.c Outdated Show resolved Hide resolved
runtime/rastrace/method_trigger.c Outdated Show resolved Hide resolved
runtime/rastrace/method_trigger.c Outdated Show resolved Hide resolved
runtime/rastrace/method_trigger.c Outdated Show resolved Hide resolved
runtime/rastrace/method_trace.c Outdated Show resolved Hide resolved
runtime/rastrace/method_trace.c Outdated Show resolved Hide resolved
@h3110n3rv3 h3110n3rv3 force-pushed the Feature-request-16416-part2 branch from 4a285f2 to 0b4ffe9 Compare December 9, 2024 12:41
runtime/rasdump/dmpsup.c Outdated Show resolved Hide resolved
runtime/rastrace/method_trace.c Outdated Show resolved Hide resolved
runtime/rastrace/method_trigger.c Outdated Show resolved Hide resolved
runtime/rastrace/method_trigger.c Outdated Show resolved Hide resolved
runtime/rastrace/method_trigger.c Outdated Show resolved Hide resolved
runtime/rastrace/method_trigger.c Outdated Show resolved Hide resolved
runtime/rastrace/method_trigger.c Outdated Show resolved Hide resolved
runtime/rastrace/trcengine.c Outdated Show resolved Hide resolved
@h3110n3rv3 h3110n3rv3 force-pushed the Feature-request-16416-part2 branch from 66dcb5c to 50e2f3d Compare December 9, 2024 19:59
@h3110n3rv3 h3110n3rv3 changed the title WIP: Print actual string arguments with -Xtrace (part 2) Print actual string arguments with -Xtrace (part 2) Dec 9, 2024
@keithc-ca
Copy link
Contributor

Jenkins test sanity.functional amac jdk11

@keithc-ca
Copy link
Contributor

The output of -Xtrace:help should mention the new option.

For the record, testing is underway at https://openj9-jenkins.osuosl.org/job/PullRequest-OpenJ9/6690.

return OMR_ERROR_NONE;
}
err:
vaReportJ9VMCommandLineError(PORTLIB, "maxstringlength takes an integer value from 1 to %d", RAS_MAX_STRING_LENGTH_LIMIT);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The lower bound is 0, not 1.

@h3110n3rv3 h3110n3rv3 force-pushed the Feature-request-16416-part2 branch from 422c017 to 956106f Compare December 10, 2024 23:52
The changes reflect the feature request eclipse-openj9#16416.

Adding cmdline option to specify string argument length.
-Xtrace:maxstringlength=[1-128]
maxstringlength takes an unsigned integer value from 1 to 128
If maxstringlength = 0 or unspecified, default to address printing.
Other invalid inputs result in the input error.

There will be subsequent PR for tests (part 3).

Signed-off-by: Nick Kamal <[email protected]>
@h3110n3rv3 h3110n3rv3 force-pushed the Feature-request-16416-part2 branch from 3dd98d3 to 686f6ce Compare December 10, 2024 23:55
@tajila
Copy link
Contributor

tajila commented Dec 16, 2024

jenkins test sanity alinux jdk21

@tajila
Copy link
Contributor

tajila commented Dec 16, 2024

jenkins test sanity alinux64 jdk21

@tajila
Copy link
Contributor

tajila commented Dec 16, 2024

jenkins test sanity win jdk8

@tajila
Copy link
Contributor

tajila commented Dec 16, 2024

jenkins test sanity alinux64 jdk21

@tajila
Copy link
Contributor

tajila commented Dec 17, 2024

jenkins test sanity win jdk8

@tajila
Copy link
Contributor

tajila commented Dec 17, 2024

jenkins test sanity plinux jdk8

@tajila tajila merged commit d7450f0 into eclipse-openj9:master Dec 17, 2024
8 of 10 checks passed
h3110n3rv3 added a commit to h3110n3rv3/openj9 that referenced this pull request Dec 17, 2024
The changes reflect the feature request eclipse-openj9#16416 - part 3 following eclipse-openj9#20662

cmdline tests for -Xtrace:maxstringlength

Closes: eclipse-openj9#16416
Signed-off-by: Nick Kamal [email protected]
h3110n3rv3 added a commit to h3110n3rv3/openj9 that referenced this pull request Dec 17, 2024
The changes reflect the feature request eclipse-openj9#16416 - part 3 following eclipse-openj9#20662

cmdline tests for -Xtrace:maxstringlength

Closes: eclipse-openj9#16416
Signed-off-by: Nick Kamal [email protected]
h3110n3rv3 added a commit to h3110n3rv3/openj9 that referenced this pull request Dec 17, 2024
The changes reflect the feature request eclipse-openj9#16416 - part 3 following eclipse-openj9#20662

cmdline tests for -Xtrace:maxstringlength

Closes: eclipse-openj9#16416
Signed-off-by: Nick Kamal [email protected]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants