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

Side by Side Diff: appengine/findit/crash/findit_for_crash.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 unified diff | Download patch
« no previous file with comments | « appengine/findit/crash/callstack_filters.py ('k') | appengine/findit/crash/fracas_parser.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 from collections import defaultdict 5 from collections import defaultdict
6 6
7 from common.diff import ChangeType 7 from common.diff import ChangeType
8 from common.git_repository import GitRepository 8 from common.git_repository import GitRepository
9 from common.http_client_appengine import HttpClientAppengine 9 from common.http_client_appengine import HttpClientAppengine
10 from crash import crash_util 10 from crash import crash_util
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after
228 228
229 Returns: 229 Returns:
230 List of dicts of culprit results, sorted by confidence from highest to 230 List of dicts of culprit results, sorted by confidence from highest to
231 lowest. 231 lowest.
232 """ 232 """
233 if not regression_deps_rolls: 233 if not regression_deps_rolls:
234 return [] 234 return []
235 235
236 # We are only interested in the deps in crash stack (the callstack that 236 # We are only interested in the deps in crash stack (the callstack that
237 # caused the crash). 237 # caused the crash).
238 stack_deps = GetDepsInCrashStack(stacktrace.GetCrashStack(), crashed_deps) 238 stack_deps = GetDepsInCrashStack(stacktrace.crash_stack, crashed_deps)
239 239
240 # Get dep and file to changelogs, stack_info and blame dicts. 240 # Get dep and file to changelogs, stack_info and blame dicts.
241 dep_to_file_to_changelogs, ignore_cls = GetChangeLogsForFilesGroupedByDeps( 241 dep_to_file_to_changelogs, ignore_cls = GetChangeLogsForFilesGroupedByDeps(
242 regression_deps_rolls, stack_deps) 242 regression_deps_rolls, stack_deps)
243 dep_to_file_to_stack_infos = GetStackInfosForFilesGroupedByDeps( 243 dep_to_file_to_stack_infos = GetStackInfosForFilesGroupedByDeps(
244 stacktrace, stack_deps) 244 stacktrace, stack_deps)
245 dep_to_file_to_blame = GetBlameForFilesGroupedByDeps(stacktrace, stack_deps) 245 dep_to_file_to_blame = GetBlameForFilesGroupedByDeps(stacktrace, stack_deps)
246 246
247 results = FindMatchResults(dep_to_file_to_changelogs, 247 results = FindMatchResults(dep_to_file_to_changelogs,
248 dep_to_file_to_stack_infos, 248 dep_to_file_to_stack_infos,
249 dep_to_file_to_blame, 249 dep_to_file_to_blame,
250 ignore_cls) 250 ignore_cls)
251 251
252 if not results: 252 if not results:
253 return [] 253 return []
254 254
255 aggregator = Aggregator([TopFrameIndex(), MinDistance()]) 255 aggregator = Aggregator([TopFrameIndex(), MinDistance()])
256 256
257 map(aggregator.ScoreAndReason, results) 257 map(aggregator.ScoreAndReason, results)
258 258
259 return sorted([result.ToDict() for result in results], 259 return sorted([result.ToDict() for result in results],
260 key=lambda r: -r['confidence']) 260 key=lambda r: -r['confidence'])
OLDNEW
« no previous file with comments | « appengine/findit/crash/callstack_filters.py ('k') | appengine/findit/crash/fracas_parser.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698