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

Unified Diff: appengine/findit/crash/callstack_filters.py

Issue 1980203002: [Findit] Filter inline function path frames (Closed) Base URL: https://chromium.googlesource.com/infra/infra.git@master
Patch Set: Rebase and fix nits. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | appengine/findit/crash/findit_for_crash.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: appengine/findit/crash/callstack_filters.py
diff --git a/appengine/findit/crash/callstack_filters.py b/appengine/findit/crash/callstack_filters.py
index 2ff2c693e1daf3855230e614619feb2991a6ba6f..58daff290e839537b0178db18bc8d8a7f78f20ac 100644
--- a/appengine/findit/crash/callstack_filters.py
+++ b/appengine/findit/crash/callstack_filters.py
@@ -4,21 +4,28 @@
import re
+from crash.callstack import CallStack
-def FilterFramesBeforeSignature(callstack, signature):
- """Filter all the stack frames before the signature frame.
- Note: The callstack is filtered in place.
- """
- if not signature:
- return
+_INLINE_FUNCTION_FILE_PATH_MARKERS = [
+ 'third_party/llvm-build/Release+Asserts/include/c++/v1/',
+ 'linux/debian_wheezy_amd64-sysroot/usr/include/c++/4.6/bits/',
+ 'eglibc-3GlaMS/eglibc-2.19/sysdeps/unix/',
+]
+
- signature_frame_index = 0
- # Filter out the types of signature, for example [Out of Memory].
- signature = re.sub('[[][^]]*[]]\s*', '', signature)
+def FilterInlineFunctionFrames(callstack):
+ """Filters all the stack frames with inline function file paths.
+
+ File paths for inline functions are not the oringinal file paths. They
+ should be filtered out.
+ """
+ def _IsNonInlineFunctionFrame(frame):
+ for path_marker in _INLINE_FUNCTION_FILE_PATH_MARKERS:
+ if path_marker in frame.file_path:
+ return False
- for index, frame in enumerate(callstack):
- if signature in frame.function:
- signature_frame_index = index
+ return True
- callstack[:] = callstack[signature_frame_index:]
+ return CallStack(callstack.priority, callstack.format_type,
+ filter(_IsNonInlineFunctionFrame, callstack))
« no previous file with comments | « no previous file | appengine/findit/crash/findit_for_crash.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698