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

Side by Side Diff: Tools/Scripts/webkitpy/layout_tests/breakpad/dump_reader_multipart.py

Issue 276433002: Defer to generate breakpad symbols to decide whether or not to dump symbols (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (C) 2013 Google Inc. All rights reserved. 1 # Copyright (C) 2013 Google Inc. All rights reserved.
2 # 2 #
3 # Redistribution and use in source and binary forms, with or without 3 # Redistribution and use in source and binary forms, with or without
4 # modification, are permitted provided that the following conditions are 4 # modification, are permitted provided that the following conditions are
5 # met: 5 # met:
6 # 6 #
7 # * Redistributions of source code must retain the above copyright 7 # * Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # * Redistributions in binary form must reproduce the above 9 # * Redistributions in binary form must reproduce the above
10 # copyright notice, this list of conditions and the following disclaimer 10 # copyright notice, this list of conditions and the following disclaimer
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 def _path_to_minidump_stackwalk(self): 115 def _path_to_minidump_stackwalk(self):
116 return self._host.filesystem.join(self._build_dir, "minidump_stackwalk") 116 return self._host.filesystem.join(self._build_dir, "minidump_stackwalk")
117 117
118 def _path_to_generate_breakpad_symbols(self): 118 def _path_to_generate_breakpad_symbols(self):
119 return self._webkit_finder.path_from_chromium_base("components", "breakp ad", "tools", "generate_breakpad_symbols.py") 119 return self._webkit_finder.path_from_chromium_base("components", "breakp ad", "tools", "generate_breakpad_symbols.py")
120 120
121 def _symbols_dir(self): 121 def _symbols_dir(self):
122 return self._host.filesystem.join(self._build_dir, 'content_shell.syms') 122 return self._host.filesystem.join(self._build_dir, 'content_shell.syms')
123 123
124 def _generate_breakpad_symbols_if_necessary(self): 124 def _generate_breakpad_symbols_if_necessary(self):
125 if self._host.filesystem.exists(self._symbols_dir()): 125 _log.debug("Generating breakpad symbols")
126 needs_update = False
127 symbols_mtime = self._host.filesystem.mtime(self._symbols_dir())
128 for binary in self._binaries_to_symbolize():
129 full_path = self._host.filesystem.join(self._build_dir, binary)
130 if self._host.filesystem.mtime(full_path) >= symbols_mtime:
131 needs_update = True
132 if not needs_update:
133 return
134
135 _log.debug("Regenerating breakpad symbols")
136 self._host.filesystem.rmtree(self._symbols_dir())
137
138 for binary in self._binaries_to_symbolize(): 126 for binary in self._binaries_to_symbolize():
139 full_path = self._host.filesystem.join(self._build_dir, binary) 127 full_path = self._host.filesystem.join(self._build_dir, binary)
140 cmd = [ 128 cmd = [
141 self._path_to_generate_breakpad_symbols(), 129 self._path_to_generate_breakpad_symbols(),
142 '--binary=%s' % full_path, 130 '--binary=%s' % full_path,
143 '--symbols-dir=%s' % self._symbols_dir(), 131 '--symbols-dir=%s' % self._symbols_dir(),
144 '--build-dir=%s' % self._build_dir, 132 '--build-dir=%s' % self._build_dir,
145 ] 133 ]
146 try: 134 try:
147 self._host.executive.run_command(cmd) 135 self._host.executive.run_command(cmd)
(...skipping 18 matching lines...) Expand all
166 154
167 155
168 class DumpReaderAndroid(DumpReaderMultipart): 156 class DumpReaderAndroid(DumpReaderMultipart):
169 """Android breakpad dump reader.""" 157 """Android breakpad dump reader."""
170 158
171 def _binaries_to_symbolize(self): 159 def _binaries_to_symbolize(self):
172 return ['lib/libcontent_shell_content_view.so'] 160 return ['lib/libcontent_shell_content_view.so']
173 161
174 def _file_extension(self): 162 def _file_extension(self):
175 return 'dmp' 163 return 'dmp'
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698