use of com.ibm.dtfj.javacore.parser.framework.tag.LineRule in project openj9 by eclipse.
the class EnvironmentTagParser method addStartTimeRule.
/**
* Add rule for the JVM start time line
* 1CISTARTTIME JVM start time: 2015/07/17 at 13:31:04:547
*/
private void addStartTimeRule() {
ILineRule lineRule = new LineRule() {
public void processLine(String source, int startingOffset) {
consumeUntilFirstMatch(CommonPatternMatchers.colon);
consumeUntilFirstMatch(CommonPatternMatchers.whitespace);
addToken(START_TIME, CommonPatternMatchers.allButLineFeed);
}
};
addTag(T_1CISTARTTIME, lineRule);
}
use of com.ibm.dtfj.javacore.parser.framework.tag.LineRule in project openj9 by eclipse.
the class PlatformTagParser method addHostName.
/**
* Add rules for the host name
* 2XHHOSTNAME Host : myhost:9.20.2.67
*/
private void addHostName() {
ILineRule lineRule = new LineRule() {
public void processLine(String source, int startingOffset) {
consumeUntilFirstMatch(CommonPatternMatchers.colon);
consumeUntilFirstMatch(CommonPatternMatchers.whitespace);
addAllCharactersAsTokenAndConsumeFirstMatch(PL_HOST_NAME, CommonPatternMatchers.colon);
addToken(PL_HOST_ADDR, CommonPatternMatchers.allButLineFeed);
}
};
addTag(T_2XHHOSTNAME, lineRule);
}
use of com.ibm.dtfj.javacore.parser.framework.tag.LineRule in project openj9 by eclipse.
the class PlatformTagParser method addOSLevel.
/**
* Add rules for the OS level information (2XHOSLEVEL line)
*/
private void addOSLevel() {
ILineRule lineRule = new LineRule() {
public void processLine(String source, int startingOffset) {
// here we get the OS name, which in javacore is concatenated with
// the OS level, so we have to pull out the specific OS names
consumeUntilFirstMatch(CommonPatternMatchers.colon);
if (findFirst(PlatformPatternMatchers.Windows_XP)) {
addToken(PL_OS_NAME, PlatformPatternMatchers.Windows_XP);
} else if (findFirst(PlatformPatternMatchers.Windows_Server_2003)) {
addToken(PL_OS_NAME, PlatformPatternMatchers.Windows_Server_2003);
} else if (findFirst(PlatformPatternMatchers.Windows_Server_2008)) {
addToken(PL_OS_NAME, PlatformPatternMatchers.Windows_Server_2008);
} else if (findFirst(PlatformPatternMatchers.Windows_2000)) {
addToken(PL_OS_NAME, PlatformPatternMatchers.Windows_2000);
} else if (findFirst(PlatformPatternMatchers.Windows_Vista)) {
addToken(PL_OS_NAME, PlatformPatternMatchers.Windows_Vista);
} else if (findFirst(PlatformPatternMatchers.Windows_7)) {
addToken(PL_OS_NAME, PlatformPatternMatchers.Windows_7);
} else if (findFirst(PlatformPatternMatchers.Windows_8)) {
addToken(PL_OS_NAME, PlatformPatternMatchers.Windows_8);
} else if (findFirst(PlatformPatternMatchers.Windows_Server_8)) {
addToken(PL_OS_NAME, PlatformPatternMatchers.Windows_Server_8);
} else if (findFirst(PlatformPatternMatchers.Windows_Server_2012)) {
addToken(PL_OS_NAME, PlatformPatternMatchers.Windows_Server_2012);
} else if (findFirst(PlatformPatternMatchers.Windows_Generic)) {
addToken(PL_OS_NAME, PlatformPatternMatchers.Windows_Generic);
} else if (findFirst(PlatformPatternMatchers.Linux)) {
addToken(PL_OS_NAME, PlatformPatternMatchers.Linux);
} else if (findFirst(PlatformPatternMatchers.AIX)) {
addToken(PL_OS_NAME, PlatformPatternMatchers.AIX);
} else if (findFirst(PlatformPatternMatchers.z_OS)) {
addToken(PL_OS_NAME, PlatformPatternMatchers.z_OS);
}
// if we did not find a recognised OS name the token is not
// set and will show DataUnavailable through the DTFJ API
consumeUntilFirstMatch(CommonPatternMatchers.whitespace);
// grab the remainder of the line as the OS version
addToken(PL_OS_VERSION, CommonPatternMatchers.allButLineFeed);
}
};
addTag(T_2XHOSLEVEL, lineRule);
}
use of com.ibm.dtfj.javacore.parser.framework.tag.LineRule in project openj9 by eclipse.
the class PlatformTagParser method addCPUCount.
/**
* Add rule for the number of CPUs information (3XHNUMCPUS line)
*/
private void addCPUCount() {
ILineRule lineRule = new LineRule() {
public void processLine(String source, int startingOffset) {
// the CPU count is a decimal number following a colon
consumeUntilFirstMatch(CommonPatternMatchers.colon);
addToken(PL_CPU_COUNT, CommonPatternMatchers.dec);
}
};
addTag(T_3XHNUMCPUS, lineRule);
addTag(T_3XHNUMASUP, null);
}
use of com.ibm.dtfj.javacore.parser.framework.tag.LineRule in project openj9 by eclipse.
the class MonitorTagParser method initTagAttributeRules.
protected void initTagAttributeRules() {
addTag(T_1LKPOOLINFO, null);
addPoolTotal();
addTag(T_1LKMONPOOLDUMP, null);
addMonInUse();
addMonObject();
addTag(T_3LKWAITERQ, null);
addWaiter();
addTag(T_3LKNOTIFYQ, null);
addWaitNotify();
addTag(T_1LKREGMONDUMP, null);
addRegMon();
// Deadlock support skipped for now.
// addTag(T_1LKDEADLOCK, null);
// addDeadLockThr();
// addTag(T_3LKDEADLOCKWTR, null);
// addDeadLockMon();
// addDeadLockObj();
// addDeadLockReg();
// addTag(T_3LKDEADLOCKOWN, null);
ILineRule lineRule = new LineRule() {
public void processLine(String source, int startingOffset) {
// Thread identifiers (as used in flat monitors):
addToken(IMonitorTypes.MONITOR_SECTION, CommonPatternMatchers.allButLineFeed);
}
};
addTag(IMonitorTypesSov.LK_FLAT_MON_DUMP, lineRule);
ILineRule lineRule2 = new LineRule() {
public void processLine(String source, int startingOffset) {
// ident 0x05 "Finalizer" (0x14B09E0) ee 0x014B0800
addPrefixedHexToken(IMonitorTypesSov.MONITOR_FLAT_ID);
addToken(MONITOR_THREAD_NAME, CommonPatternMatchers.quoted_stringvalue);
addPrefixedHexToken(MONITOR_THREAD_ID);
addPrefixedHexToken(IMonitorTypesSov.MONITOR_THREAD_EE);
}
};
addTag(IMonitorTypesSov.LK_FLAT_MON, lineRule2);
addTag(IMonitorTypesSov.LK_OBJ_MON_DUMP, null);
ILineRule lineRule3 = new MonitorObjectLineRule() {
public void processLine(String source, int startingOffset) {
// java.lang.String@C1FF58/C1FF60
addMonitorObjectNameAndAddress();
}
};
addTag(IMonitorTypesSov.LK_INFLATED_MON, lineRule3);
addTag(IMonitorTypesSov.LK_INFL_DETAILS, null);
addTag(IMonitorTypesSov.LK_FLAT_LOCKED, lineRule3);
ILineRule lineRule4 = new LineRule() {
public void processLine(String source, int startingOffset) {
// locknflags 00050000 Flat locked by thread ident 0x05, entry count 1
addPrefixedHexToken(IMonitorTypesSov.MONITOR_FLAT_ID);
}
};
addTag(IMonitorTypesSov.LK_FLAT_DETAILS, lineRule4);
}
Aggregations