Search in sources :

Example 16 with LineRule

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

the class EnvironmentTagParser method addProcessIDRule.

/**
 * Add rule for the process id (2CIPROCESSID tag)
 */
private void addProcessIDRule() {
    ILineRule lineRule = new LineRule() {

        public void processLine(String source, int startingOffset) {
            // pid is in decimal then hex, we only need the first one.
            consumeUntilFirstMatch(CommonPatternMatchers.whitespace);
            addToken(PID_STRING, CommonPatternMatchers.dec);
        }
    };
    addTag(T_1CIPROCESSID, 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 17 with LineRule

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

the class EnvironmentTagParser method addEnvironmentVars.

private void addEnvironmentVars() {
    ILineRule lineRule = new LineRule() {

        public void processLine(String source, int startingOffset) {
            consumeUntilFirstMatch(CommonPatternMatchers.whitespace);
            addToken(ENV_NAME, NOT_EQUALS);
            if (consumeUntilFirstMatch(CommonPatternMatchers.equals)) {
                addToken(ENV_VALUE, CommonPatternMatchers.allButLineFeed);
            }
        }
    };
    addTag(T_2CIENVVAR, 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 18 with LineRule

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

the class EnvironmentTagParser method addJITModesRule.

/**
 * Add rule for the JIT modes (2CICMDLINE tag)
 */
private void addJITModesRule() {
    ILineRule lineRule = new LineRule() {

        public void processLine(String source, int startingOffset) {
            // command line is on a single line, can include whitespace, separators etc
            // Java 7.0 - can get [not available]
            addToken(JIT_MODE, CommonPatternMatchers.allButLineFeed);
        }
    };
    addTag(T_1CIJITMODES, 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 19 with LineRule

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

the class EnvironmentTagParser method addUserArgs.

/**
 * Add rule for an individual user args line (2CIUSERARG tag)
 */
private void addUserArgs() {
    final Matcher hexEnd = CommonPatternMatchers.generateMatcher(" 0x\\p{XDigit}+[\\r\\n]*$");
    ILineRule lineRule = new LineRule() {

        public void processLine(String source, int startingOffset) {
            // each user arg setting is on a separate line, comprising a string after
            // some whitespace, with optional extra information (hex address) following
            consumeUntilFirstMatch(CommonPatternMatchers.whitespace);
            if (addAllCharactersAsTokenUntilFirstMatch(ARG_STRING, hexEnd) != null) {
                addPrefixedHexToken(ARG_EXTRA);
            } else {
                addToken(ARG_STRING, CommonPatternMatchers.allButLineFeed);
            }
        }
    };
    addTag(T_2CIUSERARG, lineRule);
}
Also used : LineRule(com.ibm.dtfj.javacore.parser.framework.tag.LineRule) ILineRule(com.ibm.dtfj.javacore.parser.framework.tag.ILineRule) Matcher(java.util.regex.Matcher) ILineRule(com.ibm.dtfj.javacore.parser.framework.tag.ILineRule)

Example 20 with LineRule

use of com.ibm.dtfj.javacore.parser.framework.tag.LineRule 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)

Aggregations

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