diff options
author | Xin Li <delphij@google.com> | 2017-12-06 23:18:26 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2017-12-06 23:18:26 +0000 |
commit | 9308120bc2e837170793af30388b6a21d5e47c07 (patch) | |
tree | e2717b95d0574f85ca70e6528563473247f27243 /src/com/android/loganalysis/parser/DmesgParser.java | |
parent | d4dcae820b34619b538ae08a15d495ad323cda82 (diff) | |
parent | 2dbbf0c396f7f4f75cea279931bc16d8dc77cc99 (diff) | |
download | loganalysis-9308120bc2e837170793af30388b6a21d5e47c07.tar.gz |
Merge "DO NOT MERGE: Merge Oreo MR1 into master"android-wear-p-preview-2android-wear-8.0.0_r1android-p-preview-3android-p-preview-2android-p-preview-1android-o-mr1-iot-release-1.0.0android-o-mr1-iot-preview-8android-o-mr1-iot-preview-7android-n-iot-release-lg-thinq-wk7o-mr1-iot-preview-8o-mr1-iot-preview-7
Diffstat (limited to 'src/com/android/loganalysis/parser/DmesgParser.java')
-rw-r--r-- | src/com/android/loganalysis/parser/DmesgParser.java | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/com/android/loganalysis/parser/DmesgParser.java b/src/com/android/loganalysis/parser/DmesgParser.java index ce3d389..63026d4 100644 --- a/src/com/android/loganalysis/parser/DmesgParser.java +++ b/src/com/android/loganalysis/parser/DmesgParser.java @@ -71,13 +71,22 @@ public class DmesgParser implements IParser { private static final Pattern START_STAGE = Pattern.compile( String.format("%s%s", SERVICE_PREFIX, START_STAGE_PREFIX)); + // Matches: init: processing action (early-init) from (/init.rc:14) + private static final String START_PROCESSING_ACTION_PREFIX = + String.format("processing action \\((?<%s>.*)\\) from.*$", ACTION); + // Matches: init: processing action (early-init) - private static final String START_PROCESSING_ACTION_PREFIX = String.format( - "processing action \\((?<%s>.*)\\) from.*$", ACTION); + private static final String START_PROCESSING_ACTION_PREFIX_LEGACY = + String.format("processing action \\((?<%s>.*)\\).*$", ACTION); + + // Matches: init: processing action (early-init) from (/init.rc:14) + private static final Pattern START_PROCESSING_ACTION = + Pattern.compile(String.format("%s%s", SERVICE_PREFIX, START_PROCESSING_ACTION_PREFIX)); - // Matches: [ 14.942872] init: processing action (early-init) - private static final Pattern START_PROCESSING_ACTION = Pattern.compile( - String.format("%s%s", SERVICE_PREFIX, START_PROCESSING_ACTION_PREFIX)); + // Matches: init: processing action (early-init) + private static final Pattern START_PROCESSING_ACTION_LEGACY = + Pattern.compile( + String.format("%s%s", SERVICE_PREFIX, START_PROCESSING_ACTION_PREFIX_LEGACY)); // Matches: [ 3.791635] ueventd: Coldboot took 0.695055 seconds private static final String STAGE_SUFFIX= String.format( @@ -216,7 +225,8 @@ public class DmesgParser implements IParser { @VisibleForTesting boolean parseActionInfo(String line) { Matcher match = null; - if ((match = matches(START_PROCESSING_ACTION, line)) != null) { + if ((match = matches(START_PROCESSING_ACTION, line)) != null + || (match = matches(START_PROCESSING_ACTION_LEGACY, line)) != null) { DmesgActionInfoItem actionInfoItem = new DmesgActionInfoItem(); actionInfoItem.setActionName(match.group(ACTION)); actionInfoItem.setStartTime((long) (Double.parseDouble( |