Search in sources :

Example 1 with LineRule

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

the class ClassLoaderTagParser method addNumberLoadedClasses.

/**
 */
private void addNumberLoadedClasses() {
    ILineRule lineRule = new LineRule() {

        public void processLine(String source, int startingOffset) {
            addToken(CL_ATT_NMBR_LOADED_CL, CommonPatternMatchers.dec);
        }
    };
    addTag(T_3CLNMBRLOADEDCL, 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 2 with LineRule

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

the class ClassLoaderTagParser method addNumberLoadedLib.

/**
 */
private void addNumberLoadedLib() {
    ILineRule lineRule = new LineRule() {

        public void processLine(String source, int startingOffset) {
            addToken(CL_ATT_NMBR__LIB, CommonPatternMatchers.dec);
        }
    };
    addTag(T_3CLNMBRLOADEDLIB, 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 3 with LineRule

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

the class MemoryTagParser method addSectionDetails.

protected void addSectionDetails() {
    ILineRule lineRule = new LineRule() {

        public void processLine(String source, int startingOffset) {
            if (addPrefixedHexToken(MEMORY_SEGMENT_ID) == null) {
                addNonPrefixedHexToken(MEMORY_SEGMENT_ID);
                addNonPrefixedHexToken(MEMORY_SEGMENT_HEAD);
                addNonPrefixedHexToken(MEMORY_SEGMENT_FREE);
                addNonPrefixedHexToken(MEMORY_SEGMENT_TAIL);
                addNonPrefixedHexToken(MEMORY_SEGMENT_TYPE);
                addNonPrefixedHexToken(MEMORY_SEGMENT_SIZE);
            } else {
                addPrefixedHexToken(MEMORY_SEGMENT_HEAD);
                addPrefixedHexToken(MEMORY_SEGMENT_FREE);
                addPrefixedHexToken(MEMORY_SEGMENT_TAIL);
                addPrefixedHexToken(MEMORY_SEGMENT_TYPE);
                addPrefixedHexToken(MEMORY_SEGMENT_SIZE);
            }
            ;
        }
    };
    addTag(T_1STSEGMENT, 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 4 with LineRule

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

the class EnvironmentTagParser method addCmdLineRule.

/**
 * Add rule for the command line (2CICMDLINE tag)
 */
private void addCmdLineRule() {
    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]
            consumeUntilFirstMatch(CommonPatternMatchers.whitespace);
            addToken(CMD_LINE, CommonPatternMatchers.allButLineFeed);
        }
    };
    addTag(T_1CICMDLINE, 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 5 with LineRule

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

the class StackTagParser method initTagAttributeRules.

/**
 * Initialize parser with rules for lines in the environment (CI) section in
 * the javacore
 */
protected void initTagAttributeRules() {
    ILineRule lineRule = new LineRule() {

        public void processLine(String source, int startingOffset) {
            // version is on a single line, can include whitespace, separators etc
            consumeUntilFirstMatch(CommonPatternMatchers.colon);
            addPrefixedHexToken(STACK_THREAD);
        }
    };
    addTag(T_BTTHREADID, lineRule);
    lineRule = new LineRule() {

        // Consider all the possibilities
        // Linux
        // 1BTSTACKENT          /home/vmfarm/pxa6460sr6/ibm-java-x86_64-60/jre/lib/amd64/default/libj9dyn24.so(j9bcutil_createRomClass+0x40) [0x2a99e1be00]
        // 1BTSTACKENT          /home/vmfarm/pxa6460sr6/ibm-java-x86_64-60/jre/lib/amd64/default/libj9dyn24.so [0x2a99e1be00]
        // 1BTSTACKENT          [0x2a99e1be00]
        // AIX
        // 1BTSTACKENT          0x3076AB84
        // 1BTSTACKENT          /data/AIX/testjava/java6-32/sdk/jre/lib/ppc/libj9vm24.so:0xD538DDB4 [0xD5363000 +0x0002ADB4]
        // z/OS
        // 1BTSTACKENT          MM_ConcurrentSweepScheme::workThreadFindMinimumSizeFreeEntry(MM_EnvironmentModron*,MM_Memor...:0x2C280D0C [0x2C280840 +0x000004CC]
        // 1BTSTACKENT          :0x2C284192 [0x2C283FF0 +0x000001A2]
        // 1BTSTACKENT          thread_wrapper:0x2B697FBA [0x2B697B48 +0x00000472]
        // 1BTSTACKENT          CEEVROND:0x0F7E1AE8 [0x0F7E1198 +0x00000950]
        public void processLine(String source, int startingOffset) {
            consumeUntilFirstMatch(CommonPatternMatchers.whitespace);
            if (indexOfLast(LINUXADDRESS) >= 0) {
                IParserToken token = addAllCharactersAsTokenAndConsumeFirstMatch(STACK_MODULE, CommonPatternMatchers.open_paren);
                if (token != null) {
                    addAllCharactersAsTokenAndConsumeFirstMatch(STACK_ROUTINE, Pattern.compile("[+-]").matcher(""));
                    addPrefixedHexToken(STACK_OFFSET);
                } else {
                    addAllCharactersAsTokenAndConsumeFirstMatch(STACK_MODULE, CommonPatternMatchers.whitespace);
                }
                addPrefixedHexToken(STACK_PROC_ADDRESS);
            } else {
                int lastColon = indexOfLast(CommonPatternMatchers.colon);
                if (lastColon >= 0) {
                    String name = consumeCharacters(0, lastColon);
                    if (name.indexOf("/") != -1) {
                        addToken(STACK_MODULE, name);
                    } else {
                        addToken(STACK_ROUTINE, name);
                    }
                }
                addPrefixedHexToken(STACK_PROC_ADDRESS);
                addPrefixedHexToken(STACK_ROUTINE_ADDRESS);
                addPrefixedHexToken(STACK_OFFSET);
            }
        }
    };
    addTag(T_1BTSTACKENT, lineRule);
}
Also used : LineRule(com.ibm.dtfj.javacore.parser.framework.tag.LineRule) ILineRule(com.ibm.dtfj.javacore.parser.framework.tag.ILineRule) IParserToken(com.ibm.dtfj.javacore.parser.framework.scanner.IParserToken) 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