mirror of
https://github.com/intel/llvm.git
synced 2026-01-20 01:58:44 +08:00
The command is thread trace dump function-calls and as minimum will require printing to a file in json and non-json format I added a test Differential Revision: https://reviews.llvm.org/D135521
18 lines
724 B
Python
18 lines
724 B
Python
from intelpt_testcase import *
|
|
from lldbsuite.test.lldbtest import *
|
|
from lldbsuite.test.decorators import *
|
|
|
|
class TestTraceDumpInfo(TraceIntelPTTestCaseBase):
|
|
def testDumpFunctionCalls(self):
|
|
self.expect("trace load -v " +
|
|
os.path.join(self.getSourceDir(), "intelpt-trace", "trace.json"))
|
|
|
|
self.expect("thread trace dump function-calls 2",
|
|
error=True, substrs=['error: no thread with index: "2"'])
|
|
|
|
self.expect("thread trace dump function-calls 1 -j",
|
|
substrs=['json = true, pretty_json = false, file = false, thread = 3842849'])
|
|
|
|
self.expect("thread trace dump function-calls 1 -F /tmp -J",
|
|
substrs=['false, pretty_json = true, file = true, thread = 3842849'])
|