//SRDM activeThreadsBySerial.remove(ijt.getThreadSerialNumber());
} else if (record instanceof IJavaStackTraceHProfRecord) {
// Stack traces should be attached to threads
// keep the most recent. Attach to thread so that when thread removed,
// stacktrace is removed too.
IJavaStackTraceHProfRecord stackTrace = (IJavaStackTraceHProfRecord) record;
int sn = stackTrace.getSerialNumber();
stackTraces.put(sn, r);
javastacks.add(r);
// Attach this stack trace to its thread if the thread
// exists and this trace is newer.
int threadSerial = stackTrace.getThreadSerialNumber();
IJavaThread ajt = activeThreadsBySerial.get(threadSerial);
if(ajt != null) {
((ActiveJavaThread)ajt).setStackTrace(stackTrace);
}