diff options
author | Lalit Maganti <lalitm@google.com> | 2021-03-03 15:30:11 +0000 |
---|---|---|
committer | Lalit Maganti <lalitm@google.com> | 2021-03-03 15:30:11 +0000 |
commit | 512d9781bef5992a477ecebd119d0c5527a6893b (patch) | |
tree | 5cbc3abb65d59e45ab5e1a40d21a9db3fa052d83 | |
parent | f79461a8155c38244cfdd5c2e6778789014515db (diff) | |
download | perfetto-512d9781bef5992a477ecebd119d0c5527a6893b.tar.gz |
tp: remove force sorting mode flag (and fix typo)
Change-Id: I3bc5c57fa3bc152a5403e7a413f114fa1537a667
-rw-r--r-- | CHANGELOG | 3 | ||||
-rw-r--r-- | include/perfetto/trace_processor/basic_types.h | 13 | ||||
-rw-r--r-- | src/trace_processor/importers/proto/proto_trace_reader.cc | 4 | ||||
-rw-r--r-- | src/trace_processor/trace_processor_shell.cc | 2 | ||||
-rw-r--r-- | src/trace_processor/trace_processor_storage_impl.cc | 5 | ||||
-rw-r--r-- | tools/trace_to_text/trace_to_json.cc | 4 | ||||
-rw-r--r-- | tools/trace_to_text/trace_to_systrace.cc | 4 |
7 files changed, 15 insertions, 20 deletions
@@ -2,7 +2,8 @@ Unreleased: Tracing service and probes: * Trace Processor: - * + * Remove |force_full_sort| flag from config. This has been replaced + by setting the sorting mode to force a full sort. UI: * diff --git a/include/perfetto/trace_processor/basic_types.h b/include/perfetto/trace_processor/basic_types.h index 58e614786..2b38b6d8e 100644 --- a/include/perfetto/trace_processor/basic_types.h +++ b/include/perfetto/trace_processor/basic_types.h @@ -45,7 +45,7 @@ enum class SortingMode { // relevant tables are sorted by timestamp. // // This is the default mode. - kDefaultHeureustics = 0, + kDefaultHeuristics = 0, // This option forces trace processor to wait for all trace packets to be // passed to it before doing a full sort of all the packets. This causes any @@ -60,7 +60,7 @@ enum class SortingMode { // not be relied upon. // // If a |flush_period_ms| is not specified in the TraceConfig, this mode will - // act the same as |SortingMode::kDefaultHeureustics|. + // act the same as |SortingMode::kDefaultHeuristics|. kForceFlushPeriodWindowedSort = 2 }; @@ -88,16 +88,9 @@ enum class DropFtraceDataBefore { // Struct for configuring a TraceProcessor instance (see trace_processor.h). struct PERFETTO_EXPORT Config { - // When set to true, this option forces trace processor to perform a full - // sort ignoring any internal heuristics to skip sorting parts of the data. - // This option was deprecated in v13 and replaced by - // setting |sorting_mode| to |SortingMode::kForceFullSort| - // This is option is scheduled to be removed in v14. - bool force_full_sort = false; - // Indicates the sortinng mode that trace processor should use on the passed // trace packets. See the enum documentation for more details. - SortingMode sorting_mode = SortingMode::kDefaultHeureustics; + SortingMode sorting_mode = SortingMode::kDefaultHeuristics; // When set to false, this option makes the trace processor not include ftrace // events in the raw table; this makes converting events back to the systrace diff --git a/src/trace_processor/importers/proto/proto_trace_reader.cc b/src/trace_processor/importers/proto/proto_trace_reader.cc index f6ba4cd4b..16e790872 100644 --- a/src/trace_processor/importers/proto/proto_trace_reader.cc +++ b/src/trace_processor/importers/proto/proto_trace_reader.cc @@ -260,7 +260,9 @@ void ProtoTraceReader::ParseTraceConfig(protozero::ConstBytes blob) { return; } - PERFETTO_DCHECK(cfg.sorting_mode == SortingMode::kDefaultHeureustics); + // If we end up here, we should use heuristics because either the sorting mode + // was set as such or we don't have a flush period to force the window size + // to. // If we're not forcing anything and this is a write_into_file trace, then // use flush_period_ms as an indiciator for how big the sliding window for the diff --git a/src/trace_processor/trace_processor_shell.cc b/src/trace_processor/trace_processor_shell.cc index 68131142c..f7c656c59 100644 --- a/src/trace_processor/trace_processor_shell.cc +++ b/src/trace_processor/trace_processor_shell.cc @@ -1050,7 +1050,7 @@ util::Status TraceProcessorMain(int argc, char** argv) { Config config; config.sorting_mode = options.force_full_sort ? SortingMode::kForceFullSort - : SortingMode::kDefaultHeureustics; + : SortingMode::kDefaultHeuristics; std::unique_ptr<TraceProcessor> tp = TraceProcessor::CreateInstance(config); g_tp = tp.get(); diff --git a/src/trace_processor/trace_processor_storage_impl.cc b/src/trace_processor/trace_processor_storage_impl.cc index d367bab51..298770b26 100644 --- a/src/trace_processor/trace_processor_storage_impl.cc +++ b/src/trace_processor/trace_processor_storage_impl.cc @@ -42,11 +42,6 @@ namespace trace_processor { TraceProcessorStorageImpl::TraceProcessorStorageImpl(const Config& cfg) { context_.config = cfg; - // TODO(lalitm): remove this code when Config::force_full_sort is removed. - if (cfg.force_full_sort) { - context_.config.sorting_mode = SortingMode::kForceFullSort; - } - context_.storage.reset(new TraceStorage(context_.config)); context_.track_tracker.reset(new TrackTracker(&context_)); context_.async_track_set_tracker.reset(new AsyncTrackSetTracker(&context_)); diff --git a/tools/trace_to_text/trace_to_json.cc b/tools/trace_to_text/trace_to_json.cc index 7f4ba6615..ea9516b91 100644 --- a/tools/trace_to_text/trace_to_json.cc +++ b/tools/trace_to_text/trace_to_json.cc @@ -85,7 +85,9 @@ int TraceToJson(std::istream* input, compress ? new DeflateTraceWriter(output) : new TraceWriter(output)); trace_processor::Config config; - config.force_full_sort = full_sort; + config.sorting_mode = full_sort + ? trace_processor::SortingMode::kForceFullSort + : trace_processor::SortingMode::kDefaultHeuristics; std::unique_ptr<trace_processor::TraceProcessor> tp = trace_processor::TraceProcessor::CreateInstance(config); diff --git a/tools/trace_to_text/trace_to_systrace.cc b/tools/trace_to_text/trace_to_systrace.cc index d2c4f4476..498b6c9d5 100644 --- a/tools/trace_to_text/trace_to_systrace.cc +++ b/tools/trace_to_text/trace_to_systrace.cc @@ -171,7 +171,9 @@ int TraceToSystrace(std::istream* input, ctrace ? new DeflateTraceWriter(output) : new TraceWriter(output)); trace_processor::Config config; - config.force_full_sort = full_sort; + config.sorting_mode = full_sort + ? trace_processor::SortingMode::kForceFullSort + : trace_processor::SortingMode::kDefaultHeuristics; std::unique_ptr<trace_processor::TraceProcessor> tp = trace_processor::TraceProcessor::CreateInstance(config); |