From: "Agovic, Sanimir" <sanimir.agovic@intel.com>
To: 'Yao Qi' <yao@codesourcery.com>
Cc: "gdb-patches@sourceware.org" <gdb-patches@sourceware.org>
Subject: RE: ping: [PATCH 0/4 V3] GDB Performance testing
Date: Thu, 24 Oct 2013 08:50:00 -0000 [thread overview]
Message-ID: <0377C58828D86C4588AEEC42FC3B85A71769EA52@IRSMSX105.ger.corp.intel.com> (raw)
In-Reply-To: <52688937.4030600@codesourcery.com>
Looks good to me, looking forward to your commit.
A minor comment in your perf framework:
diff --git a/gdb/testsuite/gdb.perf/lib/perftest/measure.py b/gdb/testsuite/gdb.perf/lib/perftest/measure.py
new file mode 100644
index 0000000..7478be5
--- /dev/null
+++ b/gdb/testsuite/gdb.perf/lib/perftest/measure.py
@@ -0,0 +1,146 @@
+# Copyright (C) 2013 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+import time
+import os
+import gc
+
+class Measure(object):
+ """A class that measure and collect the interesting data for a given testcase.
+
+ An instance of Measure has a collection of measurements, and each
+ of them is to measure a given aspect, such as time and memory.
+ """
+
+ def __init__(self, measurements):
+ """Constructor of measure.
+
+ measurements is a collection of Measurement objects.
+ """
+
+ self.measurements = measurements
+
+ def measure(self, func, id):
+ """Measure the operations done by func with a collection of measurements."""
+ for m in self.measurements:
+ m.start(id)
+
+ # Enable GC, force GC and disable GC before running test in order to reduce
+ # the interference from GC.
+ gc.enable()
+ gc.collect()
+ gc.disable()
+
+ func()
+
+ gc.enable()
I`d rather exclude gc cycles completely from the measurements or include gc collection
_after_ you run your perf test. Otherwise the results will depend on the order the perf
tests are run.
-Sanimir
> -----Original Message-----
> From: gdb-patches-owner@sourceware.org [mailto:gdb-patches-owner@sourceware.org] On Behalf
> Of Yao Qi
> Sent: Thursday, October 24, 2013 04:43 AM
> To: gdb-patches@sourceware.org
> Subject: ping: [PATCH 0/4 V3] GDB Performance testing
>
> On 10/16/2013 03:09 PM, Yao Qi wrote:
> > Here is the V3 of GDB performance testing. The changes in V3 can be
> > found in each patch, and they address all review comments.
> >
> > The basic usages of performance testing are unchanged,
> >
> > $ make check-perf
> > $ make check-perf RUNTESTFLAGS="--target_board=native-gdbserver solib.exp"
> > $ make check-perf RUNTESTFLAGS="solib.exp SOLIB_COUNT=512"
> >
> > We can skip compilation step like,
> >
> > $ make check-perf RUNTESTFLAGS='solib.exp GDB_PERFORMANCE=run'
> >
> > or only compile test cases,
> >
> > $ make check-perf RUNTESTFLAGS='solib.exp GDB_PERFORMANCE=compile'
> >
> > in default, GDB_PERFORMANCE=both.
> >
> > If the perf test case takes much time, we can specify timeout by
> > GDB_PERFORMANCE_TIMEOUT=1000.
> >
> > $ make check-perf RUNTESTFLAGS="--target_board=native-gdbserver
> GDB_PERFORMANCE_TIMEOUT=4000 solib.exp"
> >
> > Looks the perf test framework is in shape, so I add the patch to
> > testsuite/README to describe perf test.
>
> Ping. https://sourceware.org/ml/gdb-patches/2013-10/msg00470.html
>
> --
> Yao (齐尧)
Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen, Deutschland
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk
Registergericht: Muenchen HRB 47456
Ust.-IdNr./VAT Registration No.: DE129385895
Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052
next prev parent reply other threads:[~2013-10-24 8:50 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-16 7:10 Yao Qi
2013-10-16 7:10 ` [PATCH 1/4] New make target 'check-perf' and new dir gdb.perf Yao Qi
2013-10-25 3:04 ` Doug Evans
2013-10-25 17:34 ` Pedro Alves
2013-10-16 7:10 ` [PATCH 2/4] Perf test framework Yao Qi
2013-10-16 9:05 ` Yao Qi
2013-10-24 14:20 ` Yao Qi
2013-10-25 6:33 ` Doug Evans
2013-10-25 6:32 ` Doug Evans
2013-10-25 8:57 ` Yao Qi
2013-10-16 7:10 ` [PATCH 3/4] Mention perf test in testsuite/README Yao Qi
2013-10-25 6:43 ` Doug Evans
2013-10-16 7:10 ` [PATCH 4/4] Test on solib load and unload Yao Qi
2013-10-25 7:17 ` Doug Evans
2013-10-24 2:44 ` ping: [PATCH 0/4 V3] GDB Performance testing Yao Qi
2013-10-24 8:50 ` Agovic, Sanimir [this message]
2013-10-24 14:13 ` Yao Qi
2013-10-25 2:59 ` Doug Evans
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0377C58828D86C4588AEEC42FC3B85A71769EA52@IRSMSX105.ger.corp.intel.com \
--to=sanimir.agovic@intel.com \
--cc=gdb-patches@sourceware.org \
--cc=yao@codesourcery.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox