@@ -89,6 +89,9 @@ ABSL_FLAG(bool, trace_calls, false,
8989ABSL_FLAG (int64_t , max_ticks, 100000 ,
9090 " If non-zero, the maximum number of ticks to execute on any proc. If "
9191 " exceeded an error is returned." );
92+ ABSL_FLAG (int64_t , max_trace_verbosity, 0 ,
93+ " Maximum verbosity for traces. Traces with higher verbosity are "
94+ " stripped from the output. 0 by default." );
9295ABSL_FLAG (std::string, evaluator, " dslx-interpreter" ,
9396 " What evaluator should be used to actually execute the dslx test. "
9497 " 'dslx-interpreter' is the DSLX bytecode interpreter. 'ir-jit' is "
@@ -169,6 +172,11 @@ absl::StatusOr<TestResult> RealMain(
169172 : TypeInferenceVersion::kVersion1 )
170173 : std::nullopt ;
171174
175+ std::optional<int64_t > max_trace_verbosity =
176+ absl::GetFlag (FLAGS_max_trace_verbosity) == 0
177+ ? std::nullopt
178+ : std::optional<int64_t >(absl::GetFlag (FLAGS_max_trace_verbosity));
179+
172180 RealFilesystem vfs;
173181
174182 XLS_ASSIGN_OR_RETURN (std::string program,
@@ -243,6 +251,7 @@ absl::StatusOr<TestResult> RealMain(
243251 .trace_channels = trace_channels,
244252 .trace_calls = trace_calls,
245253 .max_ticks = max_ticks,
254+ .max_trace_verbosity = max_trace_verbosity,
246255 };
247256
248257 std::unique_ptr<AbstractTestRunner> test_runner = GetTestRunner (evaluator);
0 commit comments