Search in sources :

Example 11 with ILineRule

use of com.ibm.dtfj.javacore.parser.framework.tag.ILineRule 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);
}
Also used : LineRule(com.ibm.dtfj.javacore.parser.framework.tag.LineRule) PointerSizeLineRule(com.ibm.dtfj.javacore.parser.j9.section.common.PointerSizeLineRule) ILineRule(com.ibm.dtfj.javacore.parser.framework.tag.ILineRule) ILineRule(com.ibm.dtfj.javacore.parser.framework.tag.ILineRule)

Example 12 with ILineRule

use of com.ibm.dtfj.javacore.parser.framework.tag.ILineRule 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);
}
Also used : LineRule(com.ibm.dtfj.javacore.parser.framework.tag.LineRule) PointerSizeLineRule(com.ibm.dtfj.javacore.parser.j9.section.common.PointerSizeLineRule) ILineRule(com.ibm.dtfj.javacore.parser.framework.tag.ILineRule) ILineRule(com.ibm.dtfj.javacore.parser.framework.tag.ILineRule)

Example 13 with ILineRule

use of com.ibm.dtfj.javacore.parser.framework.tag.ILineRule 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);
}
Also used : LineRule(com.ibm.dtfj.javacore.parser.framework.tag.LineRule) ILineRule(com.ibm.dtfj.javacore.parser.framework.tag.ILineRule) ILineRule(com.ibm.dtfj.javacore.parser.framework.tag.ILineRule)

Example 14 with ILineRule

use of com.ibm.dtfj.javacore.parser.framework.tag.ILineRule 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);
}
Also used : LineRule(com.ibm.dtfj.javacore.parser.framework.tag.LineRule) ILineRule(com.ibm.dtfj.javacore.parser.framework.tag.ILineRule) ILineRule(com.ibm.dtfj.javacore.parser.framework.tag.ILineRule)

Example 15 with ILineRule

use of com.ibm.dtfj.javacore.parser.framework.tag.ILineRule in project openj9 by eclipse.

the class ThreadTagParser method initNativeStackTraceTag.

/**
 */
private void initNativeStackTraceTag() {
    ILineRule lineRule = new NativeStackTraceLineRule();
    addTag(IThreadTypes.T_4XENATIVESTACK, lineRule);
}
Also used : ILineRule(com.ibm.dtfj.javacore.parser.framework.tag.ILineRule)

Aggregations

ILineRule (com.ibm.dtfj.javacore.parser.framework.tag.ILineRule)46 LineRule (com.ibm.dtfj.javacore.parser.framework.tag.LineRule)31 PointerSizeLineRule (com.ibm.dtfj.javacore.parser.j9.section.common.PointerSizeLineRule)6 IParserToken (com.ibm.dtfj.javacore.parser.framework.scanner.IParserToken)1 Matcher (java.util.regex.Matcher)1