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

Side by Side Diff: client/profilers/blktrace/blktrace.py

Issue 3554003: Merge remote branch 'cros/upstream' into tempbranch3 (Closed) Base URL: http://git.chromium.org/git/autotest.git
Patch Set: Created 10 years, 2 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 | « client/deps/systemtap/systemtap.py ('k') | client/profilers/ftrace/__init__.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 """ 1 """
2 Autotest profiler for blktrace 2 Autotest profiler for blktrace
3 blktrace - generate traces of the i/o traffic on block devices 3 blktrace - generate traces of the i/o traffic on block devices
4 """ 4 """
5 import os 5 import os
6 from autotest_lib.client.common_lib import error 6 from autotest_lib.client.common_lib import error
7 from autotest_lib.client.bin import profiler, utils 7 from autotest_lib.client.bin import profiler, utils
8 8
9 9
10 class blktrace(profiler.profiler): 10 class blktrace(profiler.profiler):
(...skipping 12 matching lines...) Expand all
23 self.gcc_flags = ldflags + ' ' + cflags 23 self.gcc_flags = ldflags + ' ' + cflags
24 self.device = dargs.get('device', None) 24 self.device = dargs.get('device', None)
25 25
26 26
27 def setup(self, tarball='blktrace.tar.bz2', **dargs): 27 def setup(self, tarball='blktrace.tar.bz2', **dargs):
28 # v1.0.1, pulled from git, 2009/06/10 28 # v1.0.1, pulled from git, 2009/06/10
29 # commit 1e09f6e9012826fca69fa07222b7bc53c3e629ee 29 # commit 1e09f6e9012826fca69fa07222b7bc53c3e629ee
30 self.tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir) 30 self.tarball = utils.unmap_url(self.bindir, tarball, self.tmpdir)
31 utils.extract_tarball_to_dir(self.tarball, self.srcdir) 31 utils.extract_tarball_to_dir(self.tarball, self.srcdir)
32 os.chdir(self.srcdir) 32 os.chdir(self.srcdir)
33 utils.system('make ' + '"CFLAGS=' + self.gcc_flags + '"') 33 utils.make('"CFLAGS=' + self.gcc_flags + '"')
34 34
35 35
36 def get_device(self, test): 36 def get_device(self, test):
37 if getattr(test, 'device', None): 37 if getattr(test, 'device', None):
38 device = test.device 38 device = test.device
39 else: 39 else:
40 if self.device: 40 if self.device:
41 device=self.device 41 device=self.device
42 else: 42 else:
43 raise error.TestWarn('No device specified for blktrace') 43 raise error.TestWarn('No device specified for blktrace')
(...skipping 14 matching lines...) Expand all
58 utils.nuke_subprocess(self.blktrace_job.sp) 58 utils.nuke_subprocess(self.blktrace_job.sp)
59 self.blktrace_job = None 59 self.blktrace_job = None
60 60
61 61
62 def report(self, test): 62 def report(self, test):
63 output_file = os.path.join(test.profdir, 'blktrace') 63 output_file = os.path.join(test.profdir, 'blktrace')
64 if getattr(test, 'profile_tag', None): 64 if getattr(test, 'profile_tag', None):
65 output_file += '.' + test.profile_tag 65 output_file += '.' + test.profile_tag
66 device = self.get_device(test) 66 device = self.get_device(test)
67 utils.system('%s %s > %s' % (self.blkparse, device, output_file)) 67 utils.system('%s %s > %s' % (self.blkparse, device, output_file))
OLDNEW
« no previous file with comments | « client/deps/systemtap/systemtap.py ('k') | client/profilers/ftrace/__init__.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698