[Lldb-commits] [PATCH] D136801: [intelpt] Update Python tests to account for new errrors

2022-10-27 Thread Jakob Johnson via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes.
Closed by commit rG17c65e51b916: [intelpt] Update Python tests to account for 
new errrors (authored by jj10306).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136801/new/

https://reviews.llvm.org/D136801

Files:
  lldb/test/API/commands/trace/TestTraceDumpFunctionCalls.py
  lldb/test/API/commands/trace/TestTraceLoad.py

Index: lldb/test/API/commands/trace/TestTraceLoad.py
===
--- lldb/test/API/commands/trace/TestTraceLoad.py
+++ lldb/test/API/commands/trace/TestTraceLoad.py
@@ -13,11 +13,11 @@
 trace_description_file_path = os.path.join(src_dir, "intelpt-multi-core-trace", "trace.json")
 self.traceLoad(traceDescriptionFilePath=trace_description_file_path, substrs=["intel-pt"])
 self.expect("thread trace dump instructions 2 -t",
-  substrs=["19532: [20456513.000 ns] (error) expected tracing enabled event",
+  substrs=["19526: [19691636.212 ns] (error) decoding truncated: TSC 40450075478109270 exceeds maximum TSC value 40450075477704372, will skip decoding the remaining data of the PSB (skipping 774 of 825 bytes)",
"m.out`foo() + 65 at multi_thread.cpp:12:21",
-   "9524: [19691630.226 ns] 0x00400ba7jg 0x400bb3"])
+   "9524: [19691632.221 ns] 0x00400ba7jg 0x400bb3"])
 self.expect("thread trace dump instructions 3 -t",
-  substrs=["61831: [19736134.073 ns] 0x00400bd7addl   $0x1, -0x4(%rbp)",
+  substrs=["61831: [19736132.088 ns] 0x00400bd7addl   $0x1, -0x4(%rbp)",
"m.out`bar() + 26 at multi_thread.cpp:20:6"])
 
 self.expect("thread trace dump info --json",
@@ -62,20 +62,20 @@
   "traceTechnology": "intel-pt",
   "threadStats": {
 "tid": 3497496,
-"traceItemsCount": 19533,
+"traceItemsCount": 19527,
 "memoryUsage": {
-  "totalInBytes": "176065",
-  "avgPerItemInBytes": 9.''', '''},
+  "totalInBytes": "175819",
+  "avgPerItemInBytes": 9.0038920469094084''', '''},
 "timingInSeconds": {
   "Decoding instructions": ''', '''
 },
 "events": {
-  "totalCount": 11,
+  "totalCount": 5,
   "individualCounts": {
 "software disabled tracing": 1,
 "trace synchronization point": 1,
 "CPU core changed": 1,
-"HW clock tick": 8
+"HW clock tick": 2
   }
 },
 "errors": {
@@ -116,11 +116,12 @@
 # we'll load the compact trace and make sure it works
 self.traceLoad(os.path.join(compact_trace_bundle_dir, "trace.json"), substrs=["intel-pt"])
 self.expect("thread trace dump instructions 2 -t",
-  substrs=["19532: [20456513.000 ns] (error) expected tracing enabled event",
+  substrs=["19526: [19691636.212 ns] (error) decoding truncated: TSC 40450075478109270 exceeds maximum TSC value 40450075477704372, will skip decoding the remaining data of the PSB (skipping 774 of 825 bytes)",
"m.out`foo() + 65 at multi_thread.cpp:12:21",
-   "19524: [19691630.226 ns] 0x00400ba7jg 0x400bb3"])
+   "19524: [19691632.221 ns] 0x00400ba7jg 0x400bb3"])
 self.expect("thread trace dump instructions 3 -t",
-  substrs=["61831: [19736134.073 ns] 0x00400bd7addl   $0x1, -0x4(%rbp)",
+  substrs=["61833: [19736136.079 ns] (error) decoding truncated: TSC 40450075478174268 exceeds maximum TSC value 40450075477820383, will skip decoding the remaining data of the PSB (skipping 296 of 297 bytes)",
+   "61831: [19736132.088 ns] 0x00400bd7addl   $0x1, -0x4(%rbp)",
"m.out`bar() + 26 at multi_thread.cpp:20:6"])
 
 # This reduced the number of continuous executions to look at
@@ -135,11 +136,11 @@
 trace_description_file_path = os.path.join(src_dir, "intelpt-multi-core-trace", "trace_with_string_numbers.json")
 self.traceLoad(traceDescriptionFilePath=trace_description_file_path, substrs=["intel-pt"])
 self.expect("thread trace dump instructions 2 -t",
-  substrs=["19532: [20456513.000 ns] (error) expected tracing enabled event",
+  substrs=["19526: [19691636.212 ns] (error) decoding truncated: TSC 40450075478109270 exceeds maximum TSC value 40450075477704372, will skip decoding the remaining data of the PSB (skipping 774 of 825 bytes)",
"m.out`foo() + 65 at multi_thread.cpp:12:21",
-   "19524: [19691630.226 ns] 0x00400ba7jg 0x400bb3"])
+   "19524: [19691632.221 ns] 0x00400ba7jg 0x400bb3"])
 self.expect("thread trace dump instructions 3 -t",
-  substrs=["61831: [19736134.073 ns] 0x00400bd7addl   $0x1, -0x4(%rbp)",
+ 

[Lldb-commits] [PATCH] D136801: [intelpt] Update Python tests to account for new errrors

2022-10-26 Thread walter erquinigo via Phabricator via lldb-commits
wallace accepted this revision.
wallace added a comment.
This revision is now accepted and ready to land.

Thanks!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136801/new/

https://reviews.llvm.org/D136801

___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits


[Lldb-commits] [PATCH] D136801: [intelpt] Update Python tests to account for new errrors

2022-10-26 Thread Jakob Johnson via Phabricator via lldb-commits
jj10306 created this revision.
jj10306 added reviewers: wallace, persona0220.
Herald added a project: All.
jj10306 requested review of this revision.
Herald added a project: LLDB.
Herald added a subscriber: lldb-commits.

Update the Python tests (ie tests run via `lldb-dotest -p TestTrace`) to
handle new error introduced in D136610 .

Test Plan:
`lldb-dotest -p TestTrace`


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D136801

Files:
  lldb/test/API/commands/trace/TestTraceDumpFunctionCalls.py
  lldb/test/API/commands/trace/TestTraceLoad.py

Index: lldb/test/API/commands/trace/TestTraceLoad.py
===
--- lldb/test/API/commands/trace/TestTraceLoad.py
+++ lldb/test/API/commands/trace/TestTraceLoad.py
@@ -13,11 +13,11 @@
 trace_description_file_path = os.path.join(src_dir, "intelpt-multi-core-trace", "trace.json")
 self.traceLoad(traceDescriptionFilePath=trace_description_file_path, substrs=["intel-pt"])
 self.expect("thread trace dump instructions 2 -t",
-  substrs=["19532: [20456513.000 ns] (error) expected tracing enabled event",
+  substrs=["19526: [19691636.212 ns] (error) decoding truncated: TSC 40450075478109270 exceeds maximum TSC value 40450075477704372, will skip decoding the remaining data of the PSB (skipping 774 of 825 bytes)",
"m.out`foo() + 65 at multi_thread.cpp:12:21",
-   "9524: [19691630.226 ns] 0x00400ba7jg 0x400bb3"])
+   "9524: [19691632.221 ns] 0x00400ba7jg 0x400bb3"])
 self.expect("thread trace dump instructions 3 -t",
-  substrs=["61831: [19736134.073 ns] 0x00400bd7addl   $0x1, -0x4(%rbp)",
+  substrs=["61831: [19736132.088 ns] 0x00400bd7addl   $0x1, -0x4(%rbp)",
"m.out`bar() + 26 at multi_thread.cpp:20:6"])
 
 self.expect("thread trace dump info --json",
@@ -62,20 +62,20 @@
   "traceTechnology": "intel-pt",
   "threadStats": {
 "tid": 3497496,
-"traceItemsCount": 19533,
+"traceItemsCount": 19527,
 "memoryUsage": {
-  "totalInBytes": "176065",
-  "avgPerItemInBytes": 9.''', '''},
+  "totalInBytes": "175819",
+  "avgPerItemInBytes": 9.0038920469094084''', '''},
 "timingInSeconds": {
   "Decoding instructions": ''', '''
 },
 "events": {
-  "totalCount": 11,
+  "totalCount": 5,
   "individualCounts": {
 "software disabled tracing": 1,
 "trace synchronization point": 1,
 "CPU core changed": 1,
-"HW clock tick": 8
+"HW clock tick": 2
   }
 },
 "errors": {
@@ -116,11 +116,12 @@
 # we'll load the compact trace and make sure it works
 self.traceLoad(os.path.join(compact_trace_bundle_dir, "trace.json"), substrs=["intel-pt"])
 self.expect("thread trace dump instructions 2 -t",
-  substrs=["19532: [20456513.000 ns] (error) expected tracing enabled event",
+  substrs=["19526: [19691636.212 ns] (error) decoding truncated: TSC 40450075478109270 exceeds maximum TSC value 40450075477704372, will skip decoding the remaining data of the PSB (skipping 774 of 825 bytes)",
"m.out`foo() + 65 at multi_thread.cpp:12:21",
-   "19524: [19691630.226 ns] 0x00400ba7jg 0x400bb3"])
+   "19524: [19691632.221 ns] 0x00400ba7jg 0x400bb3"])
 self.expect("thread trace dump instructions 3 -t",
-  substrs=["61831: [19736134.073 ns] 0x00400bd7addl   $0x1, -0x4(%rbp)",
+  substrs=["61833: [19736136.079 ns] (error) decoding truncated: TSC 40450075478174268 exceeds maximum TSC value 40450075477820383, will skip decoding the remaining data of the PSB (skipping 296 of 297 bytes)",
+   "61831: [19736132.088 ns] 0x00400bd7addl   $0x1, -0x4(%rbp)",
"m.out`bar() + 26 at multi_thread.cpp:20:6"])
 
 # This reduced the number of continuous executions to look at
@@ -135,11 +136,11 @@
 trace_description_file_path = os.path.join(src_dir, "intelpt-multi-core-trace", "trace_with_string_numbers.json")
 self.traceLoad(traceDescriptionFilePath=trace_description_file_path, substrs=["intel-pt"])
 self.expect("thread trace dump instructions 2 -t",
-  substrs=["19532: [20456513.000 ns] (error) expected tracing enabled event",
+  substrs=["19526: [19691636.212 ns] (error) decoding truncated: TSC 40450075478109270 exceeds maximum TSC value 40450075477704372, will skip decoding the remaining data of the PSB (skipping 774 of 825 bytes)",
"m.out`foo() + 65 at multi_thread.cpp:12:21",
-   "19524: [19691630.226 ns] 0x00400ba7jg 0x400bb3"])
+   "19524: [19691632.221 ns] 0x00400ba7jg 0x400bb3"])