Home | History | Annotate | Download | only in bugreport
      1 /*
      2  * Copyright (C) 2016 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 package com.android.bugreport.bugreport;
     18 
     19 import com.android.bugreport.anr.Anr;
     20 import com.android.bugreport.logcat.Logcat;
     21 import com.android.bugreport.logcat.LogLine;
     22 import com.android.bugreport.stacks.ProcessSnapshot;
     23 import com.android.bugreport.stacks.VmTraces;
     24 
     25 import java.util.ArrayList;
     26 import java.util.GregorianCalendar;
     27 import java.util.HashMap;
     28 
     29 /**
     30  * Class to represent what we know and understand about a bugreport.
     31  */
     32 public class Bugreport {
     33     /**
     34      * The build id of the device.
     35      */
     36     public String buildId;
     37 
     38     /**
     39      * Timestamp for the beginning of the bugreport.
     40      */
     41     public GregorianCalendar startTime;
     42 
     43     /**
     44      * Timestamp for the beginning of the bugreport.
     45      */
     46     public GregorianCalendar endTime;
     47 
     48     /**
     49      * The information about the first ANR that contained in the bugreport.  If there
     50      * was a monkey report, this will be that one.  The first ANR is the most likely culprit.
     51      */
     52     public Anr anr;
     53 
     54     /**
     55      * The information about any ANR found in a monkey report.
     56      */
     57     public Anr monkeyAnr;
     58 
     59     /**
     60      * The merged logcat section of a bugreport.
     61      */
     62     public Logcat logcat;
     63 
     64     /**
     65      * The 'SYSTEM LOG' section of a bugreport.
     66      */
     67     public Logcat systemLog;
     68 
     69     /**
     70      * The 'EVENT LOG' section of a bugreport.
     71      */
     72     public Logcat eventLog;
     73 
     74     /**
     75      * The stack traces from the VM TRACES JUST NOW section.
     76      */
     77     public VmTraces vmTracesJustNow;
     78 
     79     /**
     80      * The stack traces from the VM TRACES AT LAST ANR section.
     81      */
     82     public VmTraces vmTracesLastAnr;
     83 
     84     /**
     85      * The logcat lines that have something interesting about them.
     86      */
     87     public ArrayList<LogLine> interestingLogLines = new ArrayList<LogLine>();
     88 
     89     /**
     90      * The set of all known processes.  This is scraped from lots of sources.
     91      */
     92     public HashMap<Integer,ProcessInfo> allKnownProcesses = new HashMap<Integer,ProcessInfo>();
     93 }
     94 
     95