use of com.ibm.dtfj.javacore.parser.framework.tag.LineRule in project openj9 by eclipse.
the class ThreadTagParser method initThreadInfo1Tag.
/**
*/
private void initThreadInfo1Tag() {
// 3XMTHREADINFO1 (native thread ID:0x88C, native priority:0x5, native policy:UNKNOWN, vmstate:R, vm thread flags:0x00000020)
// vmstate and vm thread flags added in LIR 14327
ILineRule lineRule = new LineRule() {
public void processLine(String source, int startingOffset) {
/*
* NATIVE_THREAD_ID
*/
consumeUntilFirstMatch(CommonPatternMatchers.colon);
addPrefixedHexToken(IThreadTypes.NATIVE_THREAD_ID);
/*
* NATIVE_THREAD_PRIORITY
*/
consumeUntilFirstMatch(CommonPatternMatchers.colon);
addPrefixedHexToken(IThreadTypes.NATIVE_THREAD_PRIORITY);
/*
* NATIVE_THREAD_POLICY
*/
consumeUntilFirstMatch(CommonPatternMatchers.colon);
addToken(IThreadTypes.NATIVE_THREAD_POLICY, CommonPatternMatchers.lettervalue);
/*
* Optional: Native Scope
*/
if (findFirst(ThreadPatternMatchers.scope) && consumeUntilFirstMatch(CommonPatternMatchers.colon)) {
addPrefixedHexToken(IThreadTypes.SCOPE);
}
/*
* Optional: VM thread state
*/
if (findFirst(ThreadPatternMatchers.vmstate) && consumeUntilFirstMatch(CommonPatternMatchers.colon)) {
addToken(IThreadTypes.VM_STATE, CommonPatternMatchers.lettervalue);
}
/*
* Optional: VM thread flags
*/
if (findFirst(ThreadPatternMatchers.vmflags) && consumeUntilFirstMatch(CommonPatternMatchers.colon)) {
addPrefixedHexToken(IThreadTypes.VM_FLAGS);
}
}
};
addTag(IThreadTypes.T_3XMTHREADINFO1, lineRule);
}
use of com.ibm.dtfj.javacore.parser.framework.tag.LineRule in project openj9 by eclipse.
the class ThreadTagParser method initTagAttributeRules.
/**
* Call inherited method addTag() to add a tag->rule pair.
*/
protected void initTagAttributeRules() {
/*
* Tags with attributes
*/
initThreadInfoTag();
initThreadInfo1Tag();
initThreadInfo2Tag();
initCPUTimeTag();
initThreadBlockTag();
initStackTraceTag();
initNativeStackTraceTag();
initOSInfoTag();
ILineRule lineRule = new LineRule() {
public void processLine(String source, int startingOffset) {
}
};
addTag(IThreadTypes.T_1XMCURTHDINFO, lineRule);
/*
* Tags with no attributes (or attributes to be ignored)
*/
addTag(IThreadTypes.T_1XMTHDINFO, null);
}
use of com.ibm.dtfj.javacore.parser.framework.tag.LineRule in project openj9 by eclipse.
the class ThreadTagParser method initCPUTimeTag.
private void initCPUTimeTag() {
// 3XMCPUTIME CPU usage total: 9.656250000 secs, user: 4.781250000 secs secs, system: 4.875000000 secs
ILineRule lineRule = new LineRule() {
public void processLine(String source, int startingOffset) {
consumeUntilFirstMatch(ThreadPatternMatchers.cpu_time_total);
addToken(IThreadTypes.CPU_TIME_TOTAL, ThreadPatternMatchers.cpu_time);
/*
* Optional: user time
*/
if (consumeUntilFirstMatch(ThreadPatternMatchers.cpu_time_user)) {
addToken(IThreadTypes.CPU_TIME_USER, ThreadPatternMatchers.cpu_time);
}
/*
* Optional: system time
*/
if (consumeUntilFirstMatch(ThreadPatternMatchers.cpu_time_system)) {
addToken(IThreadTypes.CPU_TIME_SYSTEM, ThreadPatternMatchers.cpu_time);
}
}
};
addTag(IThreadTypes.T_3XMCPUTIME, lineRule);
}
use of com.ibm.dtfj.javacore.parser.framework.tag.LineRule in project openj9 by eclipse.
the class PlatformTagParser method addExceptionModuleRule.
/**
* Add rule for Windows exception module
*/
private void addExceptionModuleRule() {
ILineRule lineRule = new LineRule() {
public void processLine(String source, int startingOffset) {
// 1XHEXCPMODULE Offset_in_DLL: 00044340
if (findFirst(PlatformPatternMatchers.Module)) {
consumeUntilFirstMatch(PlatformPatternMatchers.Module);
consumeUntilFirstMatch(CommonPatternMatchers.whitespace);
addToken(PL_MODULE_NAME, CommonPatternMatchers.allButLineFeed);
} else if (findFirst(PlatformPatternMatchers.Module_base)) {
consumeUntilFirstMatch(PlatformPatternMatchers.Module_base);
addNonPrefixedHexToken(PL_MODULE_BASE);
} else if (findFirst(PlatformPatternMatchers.Module_offset)) {
consumeUntilFirstMatch(PlatformPatternMatchers.Module_offset);
addNonPrefixedHexToken(PL_MODULE_OFFSET);
}
}
};
addTag(T_1XHEXCPMODULE, lineRule);
}
use of com.ibm.dtfj.javacore.parser.framework.tag.LineRule in project openj9 by eclipse.
the class PlatformTagParser method addEnvironmentVars.
private void addEnvironmentVars() {
addTag(T_1XHENVVARS, new LineRule() {
public void processLine(String source, int startingOffset) {
}
});
ILineRule lineRule = new LineRule() {
public void processLine(String source, int startingOffset) {
consumeUntilFirstMatch(CommonPatternMatchers.whitespace);
addToken(ENV_NAME, NOT_EQUALS);
consumeUntilFirstMatch(CommonPatternMatchers.equals);
addToken(ENV_VALUE, CommonPatternMatchers.allButLineFeed);
}
};
addTag(T_2XHENVVAR, lineRule);
}
Aggregations