Search in sources :

Example 26 with ILineRule

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

the class EnvironmentTagParser method addStartTimeNanoRule.

/**
 * Add rule for the JVM start nanotime line
 * 1CISTARTNANO   JVM start nanotime: 3534023113503
 */
private void addStartTimeNanoRule() {
    ILineRule lineRule = new LineRule() {

        public void processLine(String source, int startingOffset) {
            // 1TINANOTIME    System nanotime: 3534320355422
            consumeUntilFirstMatch(CommonPatternMatchers.colon);
            consumeUntilFirstMatch(CommonPatternMatchers.whitespace);
            addToken(START_NANO, CommonPatternMatchers.allButLineFeed);
        }
    };
    addTag(T_1CISTARTNANO, 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 27 with ILineRule

use of com.ibm.dtfj.javacore.parser.framework.tag.ILineRule 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);
}
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 28 with ILineRule

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

the class ClassLoaderTagParser method addTextClass.

/**
 */
private void addTextClass() {
    ILineRule lineRule = new ClassLoaderLineRule() {

        public void processLine(String source, int startingOffset) {
            addAttributeNameAndAddress(ClassLoaderPatternMatchers.locked, CommonPatternMatchers.java_absolute_name_array, CLASS_ATT_NAME);
            addPrefixedHexToken(CLASS_ATT_ADDRESS);
        }
    };
    addTag(T_3CLTEXTCLASS, lineRule);
}
Also used : ILineRule(com.ibm.dtfj.javacore.parser.framework.tag.ILineRule)

Example 29 with ILineRule

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

the class ClassLoaderTagParser method addTextCLLoad.

/**
 */
private void addTextCLLoad() {
    ILineRule lineRule = new ClassLoaderLineRule() {

        public void processLine(String source, int startingOffset) {
            matchLoaderAndAddAttNameAndAddress(ClassLoaderPatternMatchers.system, CommonPatternMatchers.java_absolute_name, CL_ATT__NAME);
            addPrefixedHexToken(CL_ATT_ADDRESS);
        }
    };
    addTag(T_2CLTEXTCLLOAD, lineRule);
}
Also used : ILineRule(com.ibm.dtfj.javacore.parser.framework.tag.ILineRule)

Example 30 with ILineRule

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

the class ClassLoaderTagParser method addTextCLLoader.

/**
 */
private void addTextCLLoader() {
    ILineRule lineRule = new ClassLoaderLineRule() {

        public void processLine(String source, int startingOffset) {
            consumeUntilFirstMatch(CommonPatternMatchers.whitespace);
            addAllCharactersAsTokenUntilFirstMatch(CL_ATT_ACCESS_PERMISSIONS, CommonPatternMatchers.whitespace);
            matchLoaderAndAddAttNameAndAddress(ClassLoaderPatternMatchers.system, CommonPatternMatchers.java_absolute_name, CL_ATT__NAME);
            addPrefixedHexToken(CL_ATT_ADDRESS);
            if (consumeUntilFirstMatch(ClassLoaderPatternMatchers.shadow)) {
                addPrefixedHexToken(CL_ATT_SHADOW_ADDRESS);
            // Sov VMs have the parent loader address as the shadow address, so don't add them
            // as regular loaders because the address will be wrong.
            } else if (consumeUntilFirstMatch(ClassLoaderPatternMatchers.parent)) {
                addAttributeNameAndAddress(ClassLoaderPatternMatchers.none, CommonPatternMatchers.java_absolute_name, CL_ATT_PARENT_NAME);
                addPrefixedHexToken(CL_ATT_PARENT_ADDRESS);
            }
        }
    };
    addTag(T_2CLTEXTCLLOADER, 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