This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: ping: [PATCH 0/4 V3] GDB Performance testing
- From: Yao Qi <yao at codesourcery dot com>
- To: "Agovic, Sanimir" <sanimir dot agovic at intel dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Thu, 24 Oct 2013 22:11:37 +0800
- Subject: Re: ping: [PATCH 0/4 V3] GDB Performance testing
- Authentication-results: sourceware.org; auth=none
- References: <1381907353-30013-1-git-send-email-yao at codesourcery dot com> <52688937 dot 4030600 at codesourcery dot com> <0377C58828D86C4588AEEC42FC3B85A71769EA52 at IRSMSX105 dot ger dot corp dot intel dot com>
On 10/24/2013 04:49 PM, Agovic, Sanimir wrote:
+ 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.
Right, we should disable gc before measurements are started and enable
gc again when measurements are stopped. I'll update the patch.
--
Yao (éå)