Skip to content

Commit

Permalink
Revert "The changes reflect the feature request eclipse-openj9#16416
Browse files Browse the repository at this point in the history
…- part 2 of eclipse-openj9#20641"

This reverts commit 1d2c828.
  • Loading branch information
h3110n3rv3 committed Dec 17, 2024
1 parent 8fddf5a commit 69e1624
Showing 1 changed file with 24 additions and 24 deletions.
48 changes: 24 additions & 24 deletions runtime/rastrace/method_trigger.c
Original file line number Diff line number Diff line change
Expand Up @@ -557,36 +557,36 @@ omr_error_t
setMethodStrArgLength(J9JavaVM *vm, const char *str, BOOLEAN atRuntime)
{
PORT_ACCESS_FROM_JAVAVM(vm);
int value, length;
omr_error_t rc = OMR_ERROR_NONE;
const char *p;
int value, length;
omr_error_t rc = OMR_ERROR_NONE;
const char *p;

if (getParmNumber(str) != 1) {
goto err;
}
if (getParmNumber(str) != 1) {
goto err;
}

p = getPositionalParm(1, str, &length);
p = getPositionalParm(1, str, &length);

if (length > 3) {
goto err;
}
if (length > 3) {
goto err;
}

value = decimalString2Int(PORTLIB, p, FALSE, &rc);
if (OMR_ERROR_NONE != rc) {
goto err;
}
value = decimalString2Int(PORTLIB, p, FALSE, &rc);
if (OMR_ERROR_NONE != rc) {
goto err;
}

if ((0 > value) ||
(MAX_STRING_LENGTH < value)) {
goto err;
}
if ((0 > value) ||
(MAX_STRING_LENGTH < value)) {
goto err;
}

RAS_GLOBAL_FROM_JAVAVM(methodStrArgLength,vm) = (unsigned int)value;
return OMR_ERROR_NONE;
RAS_GLOBAL_FROM_JAVAVM(methodStrArgLength,vm) = (unsigned int)value;
return OMR_ERROR_NONE;

err:
vaReportJ9VMCommandLineError(PORTLIB, "methodstrarglen takes an unsigned integer value from 0 to %d", MAX_STRING_LENGTH);
return OMR_ERROR_INTERNAL;
vaReportJ9VMCommandLineError(PORTLIB, takes an unsigned integer value from 1 to %d", MAX_STRING_LENGTH);
return OMR_ERROR_INTERNAL;
}

/**************************************************************************
Expand Down Expand Up @@ -696,12 +696,12 @@ addTriggeredMethodSpec(J9VMThread *thr, const char *ptrMethodSpec, const struct
}

if (methodRule->entryAction != NULL && methodRule->entryAction->name != NULL
&& j9_cmdla_stricmp((char *)methodRule->entryAction->name, "jstacktrace") == 0) {
&& j9_cmdla_stricmp((char *)methodRule->entryAction->name, "jstacktrace") == 0) {
/* set up the current method spec to be enabled for trace */
setMethod(thr->javaVM, ptrMethodSpec, FALSE);
}
if (methodRule->exitAction != NULL && methodRule->exitAction->name != NULL
&& j9_cmdla_stricmp((char *)methodRule->exitAction->name, "jstacktrace") == 0) {
&& j9_cmdla_stricmp((char *)methodRule->exitAction->name, "jstacktrace") == 0) {
/* set up the current method spec to be enabled for trace */
setMethod(thr->javaVM, ptrMethodSpec, FALSE);
}
Expand Down

0 comments on commit 69e1624

Please sign in to comment.