On Thu, 2011-04-07 at 16:19 -0700, Eric Li(李咏竹) wrote: > Hi, > > > Can you send these two patches to [email protected] and CC me? > I 'd like to get these two changes upstream first and then rebase them > back.
I just looked at the patch, looks good to me. It would be a bit easier if they were sent directly to the mailing list, it makes easier for my patch check scripts. Cheers, Lucas > > Yes, I will help you to commit them in upstream. > > > Eric > > On Thu, Apr 7, 2011 at 3:11 PM, <[email protected]> wrote: > Reviewers: ericli, Benson Leung, > > Description: > perf: allow events to be specified as an iterable > > Limiting the events list to be a comma-separated string > doesn't work > for the more complex syntaxes perf now supports for things > like kprobes; > allow the list to be given as an iterable (while still > supporting a > string) and pass each using a separate -e argument > > Change-Id: I18cea36095cb4a9f93c3b9da9a8a77cb66da0686 > Signed-off-by: Scott James Remnant <[email protected]> > > BUG=chromiumos:13826 > TEST=Yes > > Please review this at http://codereview.chromium.org/6816032/ > > SVN Base: > ssh://[email protected]:9222/autotest.git@master > > Affected files: > M client/profilers/perf/perf.py > > > Index: client/profilers/perf/perf.py > diff --git a/client/profilers/perf/perf.py > b/client/profilers/perf/perf.py > index > > 211d562bdaea058341afad4fcbda3b65ec0e3664..2bd2da4fb6a8800ad8ec56c789b938f873b33429 > 100644 > --- a/client/profilers/perf/perf.py > +++ b/client/profilers/perf/perf.py > @@ -13,8 +13,12 @@ from autotest_lib.client.bin import > profiler, os_dep, utils > class perf(profiler.profiler): > version = 1 > > - def initialize(self, events="cycles,instructions"): > - self.events = events > + def initialize(self, events=["cycles","instructions"]): > + if type(events) == str: > + self.events = [events] > + else: > + self.events = events > + self.trace = trace > self.perf_bin = os_dep.command('perf') > perf_help = utils.run('%s report help' % > self.perf_bin, > ignore_status=True).stderr > @@ -31,8 +35,10 @@ class perf(profiler.profiler): > > def start(self, test): > self.logfile = os.path.join(test.profdir, "perf") > - cmd = ("%s record -a -o %s -e %s" % > - (self.perf_bin, self.logfile, self.events)) > + cmd = ("%s record -a -o %s" % > + (self.perf_bin, self.logfile)) > + for event in self.events: > + cmd += " -e %s" % event > self._process = subprocess.Popen(cmd, shell=True, > > stderr=subprocess.STDOUT) > > > > > > > -- > Eric Li > 李咏竹 > Google Kirkland > > > > _______________________________________________ > Autotest mailing list > [email protected] > http://test.kernel.org/cgi-bin/mailman/listinfo/autotest _______________________________________________ Autotest mailing list [email protected] http://test.kernel.org/cgi-bin/mailman/listinfo/autotest
