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

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

Issue 1950123003: [Findit] Fetch DEPS from buildspec/ instead of trunk for chrome official builds. (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Add signature filtering. 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
(Empty)
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
3 # found in the LICENSE file.
4
5 import re
6
7
8 def SignatureFilter(callstack, signature):
9 """Filter all the stack frames before the signature frame."""
Martin Barbella 2016/05/06 22:50:54 This class name could be improved to better reflec
Sharu Jiang 2016/05/06 23:43:46 Change it to FilterFramesBeforeSignature.
10 if not signature:
11 return
12
13 signature_frame_index = 0
14 # Filter out the types of signature, for exampel [Out of Memery] signature.
Martin Barbella 2016/05/06 22:50:55 Nit: example and Memory, also no need for the last
Sharu Jiang 2016/05/06 23:43:46 Done.
15 signature = re.sub('[[][^]]*[]]\s*', '', signature)
16
17 for index, frame in enumerate(callstack):
18 if signature in frame.function:
19 signature_frame_index = index
20
21 callstack[:] = callstack[signature_frame_index:]
stgao 2016/05/06 23:15:11 How about returning a new list instead of updating
Sharu Jiang 2016/05/06 23:43:46 Can I keep it in-place? Since I want to do: Filter
stgao 2016/05/07 00:02:53 If it can't be avoided, let's make the docstring c
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698