tp: add option to force sorting based on flush period
This unlocks a streaming-esque usecase where we don't try and sort the
whole trace in memory even if we're not writing into file.
Change-Id: I1e47b9e0285d9c44701e4b62eddb473e0a4e5ff5
diff --git a/src/trace_processor/trace_processor_shell.cc b/src/trace_processor/trace_processor_shell.cc
index 144810e..6813114 100644
--- a/src/trace_processor/trace_processor_shell.cc
+++ b/src/trace_processor/trace_processor_shell.cc
@@ -1048,7 +1048,9 @@
CommandLineOptions options = ParseCommandLineOptions(argc, argv);
Config config;
- config.force_full_sort = options.force_full_sort;
+ config.sorting_mode = options.force_full_sort
+ ? SortingMode::kForceFullSort
+ : SortingMode::kDefaultHeureustics;
std::unique_ptr<TraceProcessor> tp = TraceProcessor::CreateInstance(config);
g_tp = tp.get();