Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(437)

Side by Side Diff: appengine/findit/crash/callstack.py

Issue 1980203002: [Findit] Filter inline function path frames (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 # Copyright 2016 The Chromium Authors. All rights reserved. 1 # Copyright 2016 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import re 5 import re
6 6
7 from crash import parse_util 7 from crash import parse_util
8 from crash.type_enums import CallStackFormatType 8 from crash.type_enums import CallStackFormatType
9 9
10 # Used to parse a line into StackFrame of a Callstack. 10 # Used to parse a line into StackFrame of a Callstack.
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 CallStackFormatType.JAVA - 71 CallStackFormatType.JAVA -
72 'at com.android.commands.am.Am.onRun(Am.java:353)' 72 'at com.android.commands.am.Am.onRun(Am.java:353)'
73 73
74 CallStackFormatType.SYZYASAN - 74 CallStackFormatType.SYZYASAN -
75 'chrome_child!v8::internal::ApplyTransition+0x93 [v8/src/lookup.cc @ 340]' 75 'chrome_child!v8::internal::ApplyTransition+0x93 [v8/src/lookup.cc @ 340]'
76 76
77 CallStackFormatType.DEFAULT - 77 CallStackFormatType.DEFAULT -
78 '#0 0x32b5982 in get third_party/WebKit/Source/wtf/RefPtr.h:61:43' 78 '#0 0x32b5982 in get third_party/WebKit/Source/wtf/RefPtr.h:61:43'
79 language_type (CallStackLanguageType): Either CPP or JAVA language. 79 language_type (CallStackLanguageType): Either CPP or JAVA language.
80 """ 80 """
81 def __init__(self, stack_priority, format_type=CallStackFormatType.DEFAULT): 81 def __init__(self, priority, format_type=CallStackFormatType.DEFAULT,
82 super(CallStack, self).__init__() 82 frame_list=None):
83 self.priority = stack_priority 83 if frame_list is None:
84 frame_list = []
85
86 super(CallStack, self).__init__(frame_list)
stgao 2016/05/17 00:30:34 This seems addressed in the other CL. You may wan
Sharu Jiang 2016/05/17 18:34:58 Since that was committed, I just do a rebase :)
87 self.priority = priority
84 self.format_type = format_type 88 self.format_type = format_type
85 self.language_type = parse_util.GetLanguageTypeFromFormatType(format_type) 89 self.language_type = parse_util.GetLanguageTypeFromFormatType(format_type)
86 90
87 def ParseLine(self, line, deps): 91 def ParseLine(self, line, deps):
88 """Parse line into StackFrame instance and append it if successfully 92 """Parse line into StackFrame instance and append it if successfully
89 parsed.""" 93 parsed."""
90 line = line.strip() 94 line = line.strip()
91 line_pattern = CALLSTACK_FORMAT_TO_PATTERN[self.format_type] 95 line_pattern = CALLSTACK_FORMAT_TO_PATTERN[self.format_type]
92 96
93 if self.format_type == CallStackFormatType.JAVA: 97 if self.format_type == CallStackFormatType.JAVA:
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 # If we have the common stack frame index pattern, then use it 136 # If we have the common stack frame index pattern, then use it
133 # since it is more reliable. 137 # since it is more reliable.
134 index_match = FRAME_INDEX_PATTERN.match(line) 138 index_match = FRAME_INDEX_PATTERN.match(line)
135 if index_match: 139 if index_match:
136 stack_frame_index = int(index_match.group(1)) 140 stack_frame_index = int(index_match.group(1))
137 else: 141 else:
138 stack_frame_index = len(self) 142 stack_frame_index = len(self)
139 143
140 self.append(StackFrame(stack_frame_index, dep_path, component, 144 self.append(StackFrame(stack_frame_index, dep_path, component,
141 function, file_path, crashed_line_numbers)) 145 function, file_path, crashed_line_numbers))
OLDNEW
« no previous file with comments | « no previous file | appengine/findit/crash/callstack_filters.py » ('j') | appengine/findit/crash/callstack_filters.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698