summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-21 02:18:27 +0000
committermaruel@chromium.org <maruel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-06-21 02:18:27 +0000
commit01e67ac987c651e09b8fb0bf6e2a93f4b5a98032 (patch)
tree2be5cbf419257c871add71d60d1fe2d18e51ccd0
parent435fb2073909d409b0358add560acc7d17adf0bf (diff)
downloadchromium_src-01e67ac987c651e09b8fb0bf6e2a93f4b5a98032.zip
chromium_src-01e67ac987c651e09b8fb0bf6e2a93f4b5a98032.tar.gz
chromium_src-01e67ac987c651e09b8fb0bf6e2a93f4b5a98032.tar.bz2
Black list all /.vol/... paths in OSX.
They are not accessible by Carbon and are not useful for the tracing at the moment. Improve logging, remove unnecessary ones and add more interesting ones. R=cmp@chromium.org NOTRY=true BUG= TEST= Review URL: https://chromiumcodereview.appspot.com/10584013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@143333 0039d316-1c4b-4281-b951-d872f2087c98
-rwxr-xr-xtools/isolate/trace_inputs.py9
-rwxr-xr-xtools/isolate/trace_test_cases.py2
-rw-r--r--tools/isolate/worker_pool.py4
3 files changed, 11 insertions, 4 deletions
diff --git a/tools/isolate/trace_inputs.py b/tools/isolate/trace_inputs.py
index aa11640..e72f46f 100755
--- a/tools/isolate/trace_inputs.py
+++ b/tools/isolate/trace_inputs.py
@@ -1759,8 +1759,6 @@ class Dtrace(ApiBase):
trace_child_process.py starts the executable to trace.
"""
logging.info('trace(%s, %s, %s, %s)' % (cmd, cwd, tracename, output))
- logging.info('Running: %s' % cmd)
- logging.debug('Our pid: %d' % os.getpid())
with self._lock:
if not self._initialized:
raise TracingFailure(
@@ -1873,10 +1871,15 @@ class Dtrace(ApiBase):
@classmethod
def parse_log(cls, logname, blacklist):
logging.info('parse_log(%s, %s)' % (logname, blacklist))
+
+ def blacklist_more(filepath):
+ # All the HFS metadata is in the form /.vol/...
+ return blacklist(filepath) or re.match(r'^\/\.vol\/.+$', filepath)
+
data = read_json(logname)
out = []
for item in data['traces']:
- context = cls.Context(blacklist, item['pid'], item['cwd'])
+ context = cls.Context(blacklist_more, item['pid'], item['cwd'])
for line in open(logname + '.log', 'rb'):
context.on_line(line)
out.append(
diff --git a/tools/isolate/trace_test_cases.py b/tools/isolate/trace_test_cases.py
index ed2dc9e..0a44335 100755
--- a/tools/isolate/trace_test_cases.py
+++ b/tools/isolate/trace_test_cases.py
@@ -56,6 +56,8 @@ class Tracer(object):
'valid': valid,
'output': output,
})
+ logging.debug(
+ 'Tracing %s done: %d, %.1fs' % (test_case, returncode, duration))
if not valid:
self.progress.increase_count()
if retry:
diff --git a/tools/isolate/worker_pool.py b/tools/isolate/worker_pool.py
index 8edaee6..af0d4c9 100644
--- a/tools/isolate/worker_pool.py
+++ b/tools/isolate/worker_pool.py
@@ -6,6 +6,7 @@
thread-local result storage.
"""
+import logging
import Queue
import sys
import time
@@ -55,7 +56,8 @@ class WorkerThread(threading.Thread):
try:
func, args, kwargs = task
self.outputs.append(func(*args, **kwargs))
- except Exception:
+ except Exception, e:
+ logging.error('Caught exception! %s' % e)
self.exceptions.append(sys.exc_info())
finally:
self._tasks.task_done()