Skip to content

Commit 0ab22ee

Browse files
authored
Merge pull request #21051 from keithc-ca/j9sprintf
Improve definition of j9str_printf()
2 parents 337cedb + 8721c4e commit 0ab22ee

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+554
-582
lines changed

runtime/bcutil/ROMClassBuilder.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ ROMClassBuilder::handleAnonClassName(J9CfrClassFile *classfile, ROMClassCreation
420420
* 0x<romAddress> will be appended to anon/hidden class name.
421421
* Initialize the 0x<romAddress> part to 0x00000000 or 0x0000000000000000 (depending on the platforms).
422422
*/
423-
j9str_printf(PORTLIB, buf, ROM_ADDRESS_LENGTH + 1, ROM_ADDRESS_FORMAT, 0);
423+
j9str_printf(buf, ROM_ADDRESS_LENGTH + 1, ROM_ADDRESS_FORMAT, 0);
424424
memcpy(constantPool[newUtfCPEntry].bytes + newHostPackageLength + originalStringLength + 1, buf, ROM_ADDRESS_LENGTH + 1);
425425

426426
/* Mark if the class is a Lambda class. */
@@ -900,7 +900,7 @@ ROMClassBuilder::prepareAndLaydown( BufferManager *bufferManager, ClassFileParse
900900
* write the name into a buffer first because j9str_printf automatically adds a NULL terminator
901901
* at the end, and J9UTF8 are not NULL terminated
902902
*/
903-
j9str_printf(PORTLIB, message, ROM_ADDRESS_LENGTH + 1, ROM_ADDRESS_FORMAT, (UDATA)romClassBuffer);
903+
j9str_printf(message, ROM_ADDRESS_LENGTH + 1, ROM_ADDRESS_FORMAT, (UDATA)romClassBuffer);
904904
nameString = (char*) message;
905905
}
906906
memcpy((char*) (classNameBytes + classNameRealLenghth), nameString, ROM_ADDRESS_LENGTH);

runtime/bcutil/ROMClassCreationContext.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -507,10 +507,10 @@ class ROMClassCreationContext
507507
*/
508508
nlsMessage = OMRPORT_FROM_J9PORT(PORTLIB)->nls_lookup_message(OMRPORT_FROM_J9PORT(PORTLIB), J9NLS_DO_NOT_PRINT_MESSAGE_TAG | J9NLS_DO_NOT_APPEND_NEWLINE, module_name, message_num, NULL);
509509
if(NULL != nlsMessage) {
510-
UDATA messageLength = j9str_printf(PORTLIB, NULL, 0, nlsMessage, memberNameLength, memberName, classNameLength, className);
510+
UDATA messageLength = j9str_printf(NULL, 0, nlsMessage, memberNameLength, memberName, classNameLength, className);
511511
U_8* message = (U_8*)j9mem_allocate_memory(messageLength, OMRMEM_CATEGORY_VM);
512512
if(NULL != message) {
513-
j9str_printf(PORTLIB, (char*)message, messageLength, nlsMessage, memberNameLength, memberName, classNameLength, className);
513+
j9str_printf((char *)message, messageLength, nlsMessage, memberNameLength, memberName, classNameLength, className);
514514
recordCFRError(message);
515515
}
516516
}

runtime/bcutil/defineclass.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1014,13 +1014,13 @@ createErrorMessage(J9VMThread *vmStruct, J9ROMClass *anonROMClass, J9ROMClass *h
10141014
}
10151015
}
10161016

1017-
bufLen = j9str_printf(PORTLIB, NULL, 0, errorMsg,
1017+
bufLen = j9str_printf(NULL, 0, errorMsg,
10181018
hostClassNameLength, hostClassNameData,
10191019
anonClassNameLength, anonClassNameData);
10201020
if (bufLen > 0) {
10211021
buf = j9mem_allocate_memory(bufLen, OMRMEM_CATEGORY_VM);
10221022
if (NULL != buf) {
1023-
j9str_printf(PORTLIB, buf, bufLen, errorMsg,
1023+
j9str_printf(buf, bufLen, errorMsg,
10241024
hostClassNameLength, hostClassNameData,
10251025
anonClassNameLength, anonClassNameData);
10261026
}

runtime/bcutil/jimageintf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ jimageFindResource(J9JImageIntf *jimageIntf, UDATA handle, const char *moduleNam
339339
IDATA resourceNameLen = 1 + strlen(moduleName) + 1 + strlen(name) + 1; /* +1 for preceding '/' and, +1 for '/' between module and resource name, and +1 for \0 character */
340340
char *resourceName = j9mem_allocate_memory(resourceNameLen, J9MEM_CATEGORY_CLASSES);
341341
if ((NULL != j9jimageLocation) && (NULL != resourceName)) {
342-
j9str_printf(PORTLIB, resourceName, resourceNameLen, "/%s/%s", moduleName, name);
342+
j9str_printf(resourceName, resourceNameLen, "/%s/%s", moduleName, name);
343343
rc = j9bcutil_lookupJImageResource(PORTLIB, jimage, j9jimageLocation, resourceName);
344344
j9mem_free_memory(resourceName);
345345
if (J9JIMAGE_NO_ERROR == rc) {

runtime/bcutil/jimagereader.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ j9bcutil_loadJImage(J9PortLibrary *portlib, const char *fileName, J9JImage **pji
167167
memset(jimage, 0, sizeof(J9JImage));
168168
jimage->fd = jimagefd;
169169
jimage->fileName = (char *)(jimage + 1);
170-
j9str_printf(PORTLIB, jimage->fileName, fileNameLen + 1, "%s", fileName);
170+
j9str_printf(jimage->fileName, fileNameLen + 1, "%s", fileName);
171171
jimage->fileLength = fileSize;
172172
j9jimageHeader = jimage->j9jimageHeader = (J9JImageHeader *)((U_8 *)jimage + sizeof(J9JImage) + (fileNameLen + 1));
173173

@@ -703,20 +703,20 @@ j9bcutil_getJImageResourceName(J9PortLibrary *portlib, J9JImage *jimage, const c
703703
cursor = fullName;
704704
spaceLeft = fullNameLen;
705705
if (NULL != module) {
706-
count = j9str_printf(PORTLIB, cursor, spaceLeft, "/%s/", module);
706+
count = j9str_printf(cursor, spaceLeft, "/%s/", module);
707707
cursor += count;
708708
spaceLeft -= count;
709709
}
710710
if (NULL != parent) {
711-
count = j9str_printf(PORTLIB, cursor, spaceLeft, "%s/", parent);
711+
count = j9str_printf(cursor, spaceLeft, "%s/", parent);
712712
cursor += count;
713713
spaceLeft -= count;
714714
}
715-
count = j9str_printf(PORTLIB, cursor, spaceLeft, "%s", base);
715+
count = j9str_printf(cursor, spaceLeft, "%s", base);
716716
cursor += count;
717717
spaceLeft -= count;
718718
if (NULL != extension) {
719-
count = j9str_printf(PORTLIB, cursor, spaceLeft, ".%s", extension);
719+
count = j9str_printf(cursor, spaceLeft, ".%s", extension);
720720
}
721721

722722
*resourceName = fullName;
@@ -761,7 +761,7 @@ j9bcutil_findModuleForPackage(J9PortLibrary *portlib, J9JImage *jimage, const ch
761761
goto _end;
762762
}
763763

764-
j9str_printf(PORTLIB, packageName, packageNameLen, "%s", packagePrefix);
764+
j9str_printf(packageName, packageNameLen, "%s", packagePrefix);
765765

766766
for (i = 0; i <= strlen(package); i++) { /* include '\0' character as well */
767767
/* convert any '/' to '.' */

runtime/bcutil/test/dyntest/testHelpers.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ deleteControlDirectory(struct J9PortLibrary *portLibrary, char* baseDir) {
375375
UDATA handle, rc;
376376
char mybaseFilePath[J9SH_MAXPATH];
377377

378-
j9str_printf(PORTLIB, mybaseFilePath, J9SH_MAXPATH, "%s/*", baseDir);
378+
j9str_printf(mybaseFilePath, J9SH_MAXPATH, "%s/*", baseDir);
379379
rc = handle = j9file_findfirst(mybaseFilePath, resultBuffer);
380380
while (-1 != rc) {
381381
j9file_unlink(resultBuffer);
@@ -386,4 +386,4 @@ deleteControlDirectory(struct J9PortLibrary *portLibrary, char* baseDir) {
386386
}
387387
j9file_unlinkdir(baseDir);
388388
}
389-
}
389+
}

runtime/bcverify/vrfyhelp.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -850,14 +850,14 @@ j9bcv_createVerifyErrorString(J9PortLibrary * portLib, J9BytecodeVerificationDat
850850
J9UTF8 * romMethodSignatureString = J9ROMMETHOD_SIGNATURE(error->romMethod);
851851

852852
if (NULL == error->errorSignatureString) {
853-
errStrLength = j9str_printf(PORTLIB, (char*) verifyError, stringLength, formatString, errorString,
853+
errStrLength = j9str_printf((char *)verifyError, stringLength, formatString, errorString,
854854
(U_32) J9UTF8_LENGTH(romClassName), J9UTF8_DATA(romClassName),
855855
(U_32) J9UTF8_LENGTH(romMethodName), J9UTF8_DATA(romMethodName),
856856
(U_32) J9UTF8_LENGTH(romMethodSignatureString), J9UTF8_DATA(romMethodSignatureString),
857857
error->errorPC);
858858
} else {
859859
/* Jazz 82615: Print the corresponding NLS message to buffer for type mismatch error */
860-
errStrLength = j9str_printf(PORTLIB, (char*) verifyError, stringLength, formatString, errorString,
860+
errStrLength = j9str_printf((char *)verifyError, stringLength, formatString, errorString,
861861
(U_32) J9UTF8_LENGTH(romClassName), J9UTF8_DATA(romClassName),
862862
(U_32) J9UTF8_LENGTH(romMethodName), J9UTF8_DATA(romMethodName),
863863
(U_32) J9UTF8_LENGTH(romMethodSignatureString), J9UTF8_DATA(romMethodSignatureString),
@@ -870,7 +870,7 @@ j9bcv_createVerifyErrorString(J9PortLibrary * portLib, J9BytecodeVerificationDat
870870

871871
/* Jazz 82615: Print the error message framework to the existing error buffer */
872872
if (detailedErrMsgLength > 0) {
873-
j9str_printf(PORTLIB, (char*)&verifyError[errStrLength], stringLength - errStrLength, "%.*s", detailedErrMsgLength, detailedErrMsg);
873+
j9str_printf((char *)&verifyError[errStrLength], stringLength - errStrLength, "%.*s", detailedErrMsgLength, detailedErrMsg);
874874
}
875875
}
876876

runtime/cfdumper/main.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2833,9 +2833,9 @@ processJImageResource(const char *jimageFileName, J9JImage *jimage, J9JImageLoca
28332833

28342834
/* skip leading '/' if present */
28352835
if ('/' == resourceName[0]) {
2836-
j9str_printf(PORTLIB, tempPath, EsMaxPath, "%s", resourceName + 1);
2836+
j9str_printf(tempPath, EsMaxPath, "%s", resourceName + 1);
28372837
} else {
2838-
j9str_printf(PORTLIB, tempPath, EsMaxPath, "%s", resourceName);
2838+
j9str_printf(tempPath, EsMaxPath, "%s", resourceName);
28392839
}
28402840
current = strchr(tempPath, jimageFileSeparator);
28412841
while (NULL != current) {
@@ -3220,7 +3220,7 @@ static I_32 processROMClass(J9ROMClass* romClass, char* requestedFile, U_32 flag
32203220
length = (((length & 0xFF00) >> 8) | (length & 0x00FF) << 8);
32213221
}
32223222

3223-
j9str_printf(PORTLIB, tempPath, EsMaxPath, "%.*s", length, romClassName);
3223+
j9str_printf(tempPath, EsMaxPath, "%.*s", length, romClassName);
32243224
current = strchr(tempPath, DIR_SEPARATOR);
32253225
while (NULL != current) {
32263226
*current = '\0';

runtime/cfdumper/romdump.c

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -184,9 +184,9 @@ escapeUTF8(J9PortLibrary *portLib, J9UTF8 *utf8, char *str, size_t strSize)
184184
break;
185185
}
186186

187-
escapedLength = j9str_printf(PORTLIB, str, strSize, "\\u%04x", (UDATA)c);
187+
escapedLength = j9str_printf(str, strSize, "\\u%04x", (UDATA)c);
188188
} else {
189-
escapedLength = j9str_printf(PORTLIB, str, strSize, "%c", (char)c);
189+
escapedLength = j9str_printf(str, strSize, "%c", (char)c);
190190
}
191191

192192
strSize -= (size_t)escapedLength;
@@ -456,35 +456,35 @@ getRegionValueString(J9PortLibrary *portLib, J9ROMClass *romClass, J9ROMClassReg
456456

457457
switch (region->type) {
458458
case J9ROM_U8:
459-
j9str_printf(PORTLIB, str, strSize, "%12u", *(U_8 *)fieldPtr);
459+
j9str_printf(str, strSize, "%12u", *(U_8 *)fieldPtr);
460460
return;
461461
case J9ROM_U16:
462-
j9str_printf(PORTLIB, str, strSize, "%12u", *(U_16 *)fieldPtr);
462+
j9str_printf(str, strSize, "%12u", *(U_16 *)fieldPtr);
463463
return;
464464
case J9ROM_U32:
465-
j9str_printf(PORTLIB, str, strSize, "%12u", *(U_32 *)fieldPtr);
465+
j9str_printf(str, strSize, "%12u", *(U_32 *)fieldPtr);
466466
return;
467467
case J9ROM_U64:
468-
j9str_printf(PORTLIB, str, strSize, "%12llu", *(U_64 *)fieldPtr);
468+
j9str_printf(str, strSize, "%12llu", *(U_64 *)fieldPtr);
469469
return;
470470
case J9ROM_UTF8:
471-
j9str_printf(PORTLIB, str, strSize, "(UTF-8)");
471+
j9str_printf(str, strSize, "(UTF-8)");
472472
return;
473473
case J9ROM_SRP:
474-
j9str_printf(PORTLIB, str, strSize, "0x%08x", *(J9SRP *)fieldPtr);
474+
j9str_printf(str, strSize, "0x%08x", *(J9SRP *)fieldPtr);
475475
return;
476476
case J9ROM_WSRP:
477-
j9str_printf(PORTLIB, str, strSize, "0x%08x", *(J9WSRP *)fieldPtr);
477+
j9str_printf(str, strSize, "0x%08x", *(J9WSRP *)fieldPtr);
478478
return;
479479
case J9ROM_SECTION_END:
480-
j9str_printf(PORTLIB, str, strSize, "(SECTION)");
480+
j9str_printf(str, strSize, "(SECTION)");
481481
return;
482482
case J9ROM_INTERMEDIATECLASSDATA:
483-
j9str_printf(PORTLIB, str, strSize, "");
483+
j9str_printf(str, strSize, "");
484484
return;
485485
}
486486

487-
j9str_printf(PORTLIB, str, strSize, "<error>");
487+
j9str_printf(str, strSize, "<error>");
488488
}
489489

490490
static void
@@ -522,7 +522,7 @@ getRegionDetailString(J9PortLibrary *portLib, J9ROMClassGatherLayoutInfoState *s
522522
}
523523

524524
if (rangeValid) {
525-
UDATA length = j9str_printf(PORTLIB, str, strSize, " -> ");
525+
UDATA length = j9str_printf(str, strSize, " -> ");
526526

527527
escapeUTF8(PORTLIB, utf8, str + length, strSize - length);
528528
printedUTF8 = TRUE;
@@ -534,16 +534,16 @@ getRegionDetailString(J9PortLibrary *portLib, J9ROMClassGatherLayoutInfoState *s
534534
U_8 *addr = SRP_PTR_GET((J9SRP*)fieldPtr, U_8*);
535535

536536
if (NULL != addr) {
537-
j9str_printf(PORTLIB, str, strSize, " -> 0x%p%s", (UDATA)addr - (UDATA)romClass,
537+
j9str_printf(str, strSize, " -> 0x%p%s", (UDATA)addr - (UDATA)romClass,
538538
((UDATA)addr - (UDATA)romClass) > romClass->romSize ? " (external)" : "");
539539
}
540540
}
541541
} else if (J9ROM_INTERMEDIATECLASSDATA == region->type) {
542-
j9str_printf(PORTLIB, str, strSize, " %5d bytes !j9x 0x%p,0x%p", region->length, base + region->offset, region->length);
542+
j9str_printf(str, strSize, " %5d bytes !j9x 0x%p,0x%p", region->length, base + region->offset, region->length);
543543
}
544544

545545
if (J9ROM_SECTION_END == region->type) {
546-
j9str_printf(PORTLIB, str, strSize, " %5d bytes", region->length);
546+
j9str_printf(str, strSize, " %5d bytes", region->length);
547547
}
548548
}
549549

@@ -611,7 +611,7 @@ j9bcutil_linearDumpROMClass(J9PortLibrary *portLib, J9ROMClass *romClass, void *
611611
lastOffset = region->offset;
612612
}
613613
if (nesting < nestingThreshold) {
614-
j9str_printf(PORTLIB, buf, sizeof(buf), "Section Start: %s (%d bytes)", region->name, region->length);
614+
j9str_printf(buf, sizeof(buf), "Section Start: %s (%d bytes)", region->name, region->length);
615615
j9tty_printf(PORTLIB, "=== %-59s ===\n", buf);
616616
}
617617
nesting++;
@@ -623,7 +623,7 @@ j9bcutil_linearDumpROMClass(J9PortLibrary *portLib, J9ROMClass *romClass, void *
623623
reportSuspectedPadding(portLib, romClass, &state, lastOffset, region->offset, base);
624624
}
625625
}
626-
j9str_printf(PORTLIB, buf, sizeof(buf), "Section End: %s", region->name);
626+
j9str_printf(buf, sizeof(buf), "Section End: %s", region->name);
627627
j9tty_printf(PORTLIB, "=== %-59s ===\n", buf);
628628
} else if (nesting == nestingThreshold) {
629629
printRegionLine(portLib, &state, romClass, region, base - region->length);
@@ -811,12 +811,12 @@ j9bcutil_queryROMClass(J9PortLibrary *portLib, J9ROMClass *romClass, void *baseA
811811
char buf[256];
812812

813813
if (J9ROM_SECTION_START == region->type) {
814-
j9str_printf(PORTLIB, buf, sizeof(buf), "Section Start: %s (%d bytes)", region->name, region->length);
814+
j9str_printf(buf, sizeof(buf), "Section Start: %s (%d bytes)", region->name, region->length);
815815
j9tty_printf(PORTLIB, "=== %-59s ===\n", buf);
816816
nesting++;
817817
} else if (J9ROM_SECTION_END == region->type) {
818818
nesting--;
819-
j9str_printf(PORTLIB, buf, sizeof(buf), "Section End: %s", region->name);
819+
j9str_printf(buf, sizeof(buf), "Section End: %s", region->name);
820820
j9tty_printf(PORTLIB, "=== %-59s ===\n", buf);
821821
if (0 == nesting) {
822822
queryMatched = TRUE;
@@ -911,31 +911,31 @@ getRegionValueStringXML(J9PortLibrary *portLib, J9ROMClass *romClass, J9ROMClass
911911

912912
switch (region->type) {
913913
case J9ROM_U8:
914-
j9str_printf(PORTLIB, str, strSize, "%u", *(U_8 *)fieldPtr);
914+
j9str_printf(str, strSize, "%u", *(U_8 *)fieldPtr);
915915
return;
916916
case J9ROM_U16:
917-
j9str_printf(PORTLIB, str, strSize, "%u", *(U_16 *)fieldPtr);
917+
j9str_printf(str, strSize, "%u", *(U_16 *)fieldPtr);
918918
return;
919919
case J9ROM_U32:
920-
j9str_printf(PORTLIB, str, strSize, "%u", *(U_32 *)fieldPtr);
920+
j9str_printf(str, strSize, "%u", *(U_32 *)fieldPtr);
921921
return;
922922
case J9ROM_U64:
923-
j9str_printf(PORTLIB, str, strSize, "%llu", *(U_64 *)fieldPtr);
923+
j9str_printf(str, strSize, "%llu", *(U_64 *)fieldPtr);
924924
return;
925925
case J9ROM_UTF8: {
926926
J9UTF8 *utf8 = fieldPtr;
927927
escapeUTF8(PORTLIB, utf8, str, strSize);
928928
return;
929929
}
930930
case J9ROM_SRP:
931-
j9str_printf(PORTLIB, str, strSize, "0x%08x", *(J9SRP *)fieldPtr);
931+
j9str_printf(str, strSize, "0x%08x", *(J9SRP *)fieldPtr);
932932
return;
933933
case J9ROM_WSRP:
934-
j9str_printf(PORTLIB, str, strSize, "0x%08x", *(J9WSRP *)fieldPtr);
934+
j9str_printf(str, strSize, "0x%08x", *(J9WSRP *)fieldPtr);
935935
return;
936936
}
937937

938-
j9str_printf(PORTLIB, str, strSize, "error>");
938+
j9str_printf(str, strSize, "error>");
939939
}
940940

941941
void

runtime/codert_vm/jswalk.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ static void walkJITFrameSlots(J9StackWalkState * walkState, U_8 * jitDescription
636636
{
637637
#ifdef J9VM_INTERP_STACKWALK_TRACING
638638
PORT_ACCESS_FROM_WALKSTATE(walkState);
639-
j9str_printf(PORTLIB, indexedTag, 64, "O-Slot: %s%d", slotDescription, slotsRemaining - 1);
639+
j9str_printf(indexedTag, 64, "O-Slot: %s%d", slotDescription, slotsRemaining - 1);
640640
WALK_NAMED_O_SLOT((j9object_t*) scanCursor, indexedTag);
641641
#else
642642
WALK_O_SLOT((j9object_t*) scanCursor);
@@ -650,7 +650,7 @@ static void walkJITFrameSlots(J9StackWalkState * walkState, U_8 * jitDescription
650650
{
651651
#ifdef J9VM_INTERP_STACKWALK_TRACING
652652
PORT_ACCESS_FROM_WALKSTATE(walkState);
653-
j9str_printf(PORTLIB, indexedTag, 64, "I-Slot: %s%d", slotDescription, slotsRemaining - 1);
653+
j9str_printf(indexedTag, 64, "I-Slot: %s%d", slotDescription, slotsRemaining - 1);
654654
WALK_NAMED_I_SLOT(scanCursor, indexedTag);
655655
#else
656656
WALK_I_SLOT(scanCursor);

runtime/exelib/common/libhlp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@ char * vmDetailString( J9PortLibrary *portLib, char *detailString, UDATA detailS
513513
osversion = j9sysinfo_get_OS_version();
514514
osarch = j9sysinfo_get_CPU_architecture();
515515

516-
j9str_printf (PORTLIB, detailString, detailStringLength, "%s (%s %s %s)", EsBuildVersionString, ostype ? ostype : "unknown", osversion ? osversion : "unknown", osarch ? osarch : "unknown");
516+
j9str_printf(detailString, detailStringLength, "%s (%s %s %s)", EsBuildVersionString, ostype ? ostype : "unknown", osversion ? osversion : "unknown", osarch ? osarch : "unknown");
517517
return detailString;
518518
}
519519

runtime/gc_modron_startup/mminit.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ j9gc_initialize_heap(J9JavaVM *vm, IDATA *memoryParameterTable, UDATA heapBytesR
361361

362362
char *buffer = (char *)j9mem_allocate_memory(formatLength, OMRMEM_CATEGORY_MM);
363363
if (NULL != buffer) {
364-
j9str_printf(PORTLIB, buffer, formatLength, format, size, qualifier);
364+
j9str_printf(buffer, formatLength, format, size, qualifier);
365365
}
366366
vm->internalVMFunctions->setErrorJ9dll(PORTLIB, loadInfo, buffer, TRUE);
367367
break;
@@ -383,7 +383,7 @@ j9gc_initialize_heap(J9JavaVM *vm, IDATA *memoryParameterTable, UDATA heapBytesR
383383

384384
char *buffer = (char *)j9mem_allocate_memory(formatLength, OMRMEM_CATEGORY_MM);
385385
if (NULL != buffer) {
386-
j9str_printf(PORTLIB, buffer, formatLength, format, size, qualifier);
386+
j9str_printf(buffer, formatLength, format, size, qualifier);
387387
}
388388
vm->internalVMFunctions->setErrorJ9dll(PORTLIB, loadInfo, buffer, TRUE);
389389
break;
@@ -409,7 +409,7 @@ j9gc_initialize_heap(J9JavaVM *vm, IDATA *memoryParameterTable, UDATA heapBytesR
409409

410410
char *buffer = (char *)j9mem_allocate_memory(formatLength, OMRMEM_CATEGORY_MM);
411411
if (NULL != buffer) {
412-
j9str_printf(PORTLIB, buffer, formatLength, format, heapSize, heapSizeQualifier, pageSize, pageSizeQualifier);
412+
j9str_printf(buffer, formatLength, format, heapSize, heapSizeQualifier, pageSize, pageSizeQualifier);
413413
}
414414
vm->internalVMFunctions->setErrorJ9dll(PORTLIB, loadInfo, buffer, TRUE);
415415
extensions->largePageFailedToSatisfy = true;
@@ -435,11 +435,11 @@ j9gc_initialize_heap(J9JavaVM *vm, IDATA *memoryParameterTable, UDATA heapBytesR
435435
UDATA newSpaceSize = extensions->newSpaceSize;
436436
const char* newQualifier = NULL;
437437
qualifiedSize(&newSpaceSize, &newQualifier);
438-
UDATA formatLength = j9str_printf(PORTLIB, NULL, 0, format, splitFailure, newSpaceSize, newQualifier, oldSpaceSize, oldQualifier);
438+
UDATA formatLength = j9str_printf(NULL, 0, format, splitFailure, newSpaceSize, newQualifier, oldSpaceSize, oldQualifier);
439439

440440
char *buffer = (char *)j9mem_allocate_memory(formatLength, OMRMEM_CATEGORY_MM);
441441
if (NULL != buffer) {
442-
j9str_printf(PORTLIB, buffer, formatLength, format, splitFailure, newSpaceSize, newQualifier, oldSpaceSize, oldQualifier);
442+
j9str_printf(buffer, formatLength, format, splitFailure, newSpaceSize, newQualifier, oldSpaceSize, oldQualifier);
443443
}
444444
vm->internalVMFunctions->setErrorJ9dll(PORTLIB, loadInfo, buffer, TRUE);
445445
}

0 commit comments

Comments
 (0)