print more of the stack map when DebugFrameMaps is enabled

This commit is contained in:
Joel Dice 2012-12-12 16:04:26 -07:00
parent 663d8da975
commit 7b07b5b9a3

View File

@ -6595,11 +6595,11 @@ translateLineNumberTable(MyThread* t, Context* context, intptr_t start)
}
void
printSet(uintptr_t m, unsigned limit)
printSet(uintptr_t* m, unsigned limit)
{
if (limit) {
for (unsigned i = 0; i < 16; ++i) {
if ((m >> i) & 1) {
for (unsigned i = 0; i < 32; ++i) {
if ((*m >> i) & 1) {
fprintf(stderr, "1");
} else {
fprintf(stderr, "_");
@ -6643,7 +6643,7 @@ calculateTryCatchRoots(Context* context, SubroutinePath* subroutinePath,
if (traceRoots) {
if (DebugFrameMaps) {
fprintf(stderr, " use roots at ip %3d: ", te->ip);
printSet(*traceRoots, mapSize);
printSet(traceRoots, mapSize);
fprintf(stderr, "\n");
}
@ -6660,7 +6660,7 @@ calculateTryCatchRoots(Context* context, SubroutinePath* subroutinePath,
if (DebugFrameMaps) {
fprintf(stderr, "result roots : ");
printSet(*roots, mapSize);
printSet(roots, mapSize);
fprintf(stderr, "\n");
}
}
@ -6714,7 +6714,7 @@ calculateFrameMaps(MyThread* t, Context* context, uintptr_t* originalRoots,
if (DebugFrameMaps) {
fprintf(stderr, " roots at ip %3d: ", ip);
printSet(*RUNTIME_ARRAY_BODY(roots), mapSize);
printSet(RUNTIME_ARRAY_BODY(roots), mapSize);
fprintf(stderr, "\n");
}
@ -6743,7 +6743,7 @@ calculateFrameMaps(MyThread* t, Context* context, uintptr_t* originalRoots,
if (DebugFrameMaps) {
fprintf(stderr, " table roots at ip %3d: ", ip);
printSet(*tableRoots, mapSize);
printSet(tableRoots, mapSize);
fprintf(stderr, "\n");
}
} else {
@ -6797,7 +6797,7 @@ calculateFrameMaps(MyThread* t, Context* context, uintptr_t* originalRoots,
TraceElement* te; context->eventLog.get(eventIndex, &te, BytesPerWord);
if (DebugFrameMaps) {
fprintf(stderr, " trace roots at ip %3d: ", ip);
printSet(*RUNTIME_ARRAY_BODY(roots), mapSize);
printSet(RUNTIME_ARRAY_BODY(roots), mapSize);
if (subroutinePath) {
fprintf(stderr, " ");
print(subroutinePath);
@ -6896,7 +6896,7 @@ calculateFrameMaps(MyThread* t, Context* context, uintptr_t* originalRoots,
if (resultRoots and ip != -1) {
if (DebugFrameMaps) {
fprintf(stderr, "result roots at ip %3d: ", ip);
printSet(*RUNTIME_ARRAY_BODY(roots), mapSize);
printSet(RUNTIME_ARRAY_BODY(roots), mapSize);
if (subroutinePath) {
fprintf(stderr, " ");
print(subroutinePath);
@ -6965,7 +6965,7 @@ copyFrameMap(int32_t* dst, uintptr_t* src, unsigned mapSizeInBits,
{
if (DebugFrameMaps) {
fprintf(stderr, " orig roots at ip %3d: ", p->ip);
printSet(src[0], ceiling(mapSizeInBits, BitsPerWord));
printSet(src, ceiling(mapSizeInBits, BitsPerWord));
print(subroutinePath);
fprintf(stderr, "\n");