diff options
author | Adrian Prantl <aprantl@apple.com> | 2018-12-14 21:06:00 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2018-12-14 21:06:00 +0000 |
commit | 8f06d102915d37db60792e9b2e8808a6834faea0 (patch) | |
tree | 62ae39ab8589f2d95001b9756dd82472a9e8452b /lldb/packages/Python/lldbsuite/test/benchmarks/disassembly/TestDoAttachThenDisassembly.py | |
parent | 0cabf819ace4fee30ba5c9e5cf6d7eb39537c8ae (diff) | |
download | bcm5719-llvm-8f06d102915d37db60792e9b2e8808a6834faea0.tar.gz bcm5719-llvm-8f06d102915d37db60792e9b2e8808a6834faea0.zip |
Remove the Disassembly benchmarks.
While I was out hunting for remaining pexpect-based tests, I came
across these tests that can't possibly work an any modern system, as
they rely on having gdb available in /Developer.
This patch simply removes the test without replacement.
Differential Revision: https://reviews.llvm.org/D55559
llvm-svn: 349194
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/benchmarks/disassembly/TestDoAttachThenDisassembly.py')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/benchmarks/disassembly/TestDoAttachThenDisassembly.py | 70 |
1 files changed, 0 insertions, 70 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/benchmarks/disassembly/TestDoAttachThenDisassembly.py b/lldb/packages/Python/lldbsuite/test/benchmarks/disassembly/TestDoAttachThenDisassembly.py deleted file mode 100644 index 36f23572648..00000000000 --- a/lldb/packages/Python/lldbsuite/test/benchmarks/disassembly/TestDoAttachThenDisassembly.py +++ /dev/null @@ -1,70 +0,0 @@ -"""Test lldb's disassemblt speed. This bench deliberately attaches to an lldb -inferior and traverses the stack for thread0 to arrive at frame with function -'MainLoop'. It is important to specify an lldb executable as the inferior.""" - -from __future__ import print_function - - -import os -import sys -import lldb -from lldbsuite.test.decorators import * -from lldbsuite.test.lldbbench import * -from lldbsuite.test.lldbtest import * - - -class AttachThenDisassemblyBench(BenchBase): - - mydir = TestBase.compute_mydir(__file__) - - def setUp(self): - BenchBase.setUp(self) - self.exe = lldbtest_config.lldbExec - self.count = 10 - - @benchmarks_test - @no_debug_info_test - def test_attach_then_disassembly(self): - """Attach to a spawned lldb process then run disassembly benchmarks.""" - print() - self.run_lldb_attach_then_disassembly(self.exe, self.count) - print("lldb disassembly benchmark:", self.stopwatch) - - def run_lldb_attach_then_disassembly(self, exe, count): - target = self.dbg.CreateTarget(exe) - - # Spawn a new process and don't display the stdout if not in TraceOn() - # mode. - import subprocess - popen = subprocess.Popen([exe, self.lldbOption], stdout=open( - os.devnull, 'w') if not self.TraceOn() else None) - if self.TraceOn(): - print("pid of spawned process: %d" % popen.pid) - - # Attach to the launched lldb process. - listener = lldb.SBListener("my.attach.listener") - error = lldb.SBError() - process = target.AttachToProcessWithID(listener, popen.pid, error) - - # Set thread0 as the selected thread, followed by the 'MainLoop' frame - # as the selected frame. Then do disassembly on the function. - thread0 = process.GetThreadAtIndex(0) - process.SetSelectedThread(thread0) - i = 0 - found = False - for f in thread0: - # print("frame#%d %s" % (i, f.GetFunctionName())) - if "MainLoop" in f.GetFunctionName(): - found = True - thread0.SetSelectedFrame(i) - if self.TraceOn(): - print("Found frame#%d for function 'MainLoop'" % i) - break - i += 1 - - # Reset the stopwatch now. - self.stopwatch.reset() - for i in range(count): - with self.stopwatch: - # Disassemble the function. - self.runCmd("disassemble -f") |