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

Unified Diff: gdb/testsuite/gdb.perf/single-step.py

Issue 124383005: GDB 7.6.50 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@upstream
Patch Set: Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/testsuite/gdb.perf/single-step.c ('k') | gdb/testsuite/gdb.perf/solib.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/testsuite/gdb.perf/single-step.py
diff --git a/gdb/testsuite/gdb.base/moribund-step.exp b/gdb/testsuite/gdb.perf/single-step.py
similarity index 52%
copy from gdb/testsuite/gdb.base/moribund-step.exp
copy to gdb/testsuite/gdb.perf/single-step.py
index bf1bb260f62a599295fa74afb0631863d30e1ea5..5e55d0de1b93b3f4836bc601a08da00f9fe588cb 100644
--- a/gdb/testsuite/gdb.base/moribund-step.exp
+++ b/gdb/testsuite/gdb.perf/single-step.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2010-2012 Free Software Foundation, Inc.
+# 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
@@ -13,22 +13,22 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-set testfile moribund-step
+from perftest import perftest
-if { ![support_displaced_stepping] } {
- unsupported "displaced stepping"
- return -1
-}
+class SingleStep (perftest.TestCaseWithBasicMeasurements):
+ def __init__(self, step):
+ super (SingleStep, self).__init__ ("single-step")
+ self.step = step
-if { [prepare_for_testing ${testfile}.exp ${testfile} start.c] } {
- return -1
-}
+ def warm_up(self):
+ for _ in range(0, self.step):
+ gdb.execute("stepi", False, True)
-gdb_test_no_output "set non-stop on"
+ def _run(self, r):
+ for _ in range(0, r):
+ gdb.execute("stepi", False, True)
-if ![runto_main] {
- return
-}
-
-# GDB could crash on printing breakpoint hit on a moribund bp_location.
-gdb_test "step"
+ def execute_test(self):
+ for i in range(1, 5):
+ func = lambda: self._run(i * self.step)
+ self.measure.measure(func, i * self.step)
« no previous file with comments | « gdb/testsuite/gdb.perf/single-step.c ('k') | gdb/testsuite/gdb.perf/solib.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698