Skip to content

Commit f0fd014

Browse files
committed
Postpone more RAS dump hooks
It's not safe to handle exception-related events before JCL initialization has completed. The VM must be capable of properly handling exception dump filters (internally, the offset of Throwable.walkback is required for use by J9VMJAVALANGTHROWABLE_WALKBACK(), etc.), so those hooks are not registered until then. Signed-off-by: Keith W. Campbell <[email protected]>
1 parent 217fa03 commit f0fd014

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

runtime/rasdump/trigger.c

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,15 @@ typedef enum J9RASdumpMatchResult
6868
static UDATA rasDumpSuspendKey = 0;
6969
static UDATA rasDumpFirstThread = 0;
7070

71-
/* Postpone GC and thread event hooks
71+
/* Postpone exception, GC and thread event hooks
7272
* until later phases of VM initialization.
7373
*/
7474
static UDATA rasDumpPostponeHooks = 0
7575
| J9RAS_DUMP_ON_CLASS_UNLOAD
76+
| J9RAS_DUMP_ON_EXCEPTION_CATCH
77+
| J9RAS_DUMP_ON_EXCEPTION_DESCRIBE
78+
| J9RAS_DUMP_ON_EXCEPTION_SYSTHROW
79+
| J9RAS_DUMP_ON_EXCEPTION_THROW
7680
| J9RAS_DUMP_ON_EXCESSIVE_GC
7781
| J9RAS_DUMP_ON_GLOBAL_GC
7882
| J9RAS_DUMP_ON_OBJECT_ALLOCATION
@@ -1355,9 +1359,13 @@ rasDumpFlushHooks(J9JavaVM *vm, IDATA stage)
13551359
switch (stage) {
13561360
case TRACE_ENGINE_INITIALIZED:
13571361
/* Intermediate stage, enable all remaining hooks
1358-
* except the thread event ones.
1362+
* except the exception and thread event ones.
13591363
*/
13601364
*postponeHooks = 0
1365+
| J9RAS_DUMP_ON_EXCEPTION_CATCH
1366+
| J9RAS_DUMP_ON_EXCEPTION_DESCRIBE
1367+
| J9RAS_DUMP_ON_EXCEPTION_SYSTHROW
1368+
| J9RAS_DUMP_ON_EXCEPTION_THROW
13611369
| J9RAS_DUMP_ON_THREAD_BLOCKED
13621370
| J9RAS_DUMP_ON_THREAD_START
13631371
| J9RAS_DUMP_ON_THREAD_END

0 commit comments

Comments
 (0)