| Index: base/trace_event/trace_event_impl.cc
|
| diff --git a/base/trace_event/trace_event_impl.cc b/base/trace_event/trace_event_impl.cc
|
| index 396bcc23a0417beebf9bc507386643488eeba399..172392b6a7dd9f89699fd35dd068ec1079ea90e4 100644
|
| --- a/base/trace_event/trace_event_impl.cc
|
| +++ b/base/trace_event/trace_event_impl.cc
|
| @@ -68,6 +68,7 @@ const char kRecordAsMuchAsPossible[] = "record-as-much-as-possible";
|
| const char kTraceToConsole[] = "trace-to-console";
|
| const char kEnableSampling[] = "enable-sampling";
|
| const char kEnableSystrace[] = "enable-systrace";
|
| +const char kEnableArgsWhitelist[] = "enable-args-whitelist";
|
|
|
| // Controls the number of trace events we will buffer in-memory
|
| // before throwing them away.
|
| @@ -1014,6 +1015,8 @@ bool TraceOptions::SetFromString(const std::string& options_string) {
|
| enable_sampling = true;
|
| } else if (*iter == kEnableSystrace) {
|
| enable_systrace = true;
|
| + } else if (*iter == kEnableArgsWhitelist) {
|
| + enable_args_whitelist = true;
|
| } else {
|
| return false;
|
| }
|
| @@ -1043,6 +1046,8 @@ std::string TraceOptions::ToString() const {
|
| ret = ret + "," + kEnableSampling;
|
| if (enable_systrace)
|
| ret = ret + "," + kEnableSystrace;
|
| + if (enable_args_whitelist)
|
| + ret = ret + "," + kEnableArgsWhitelist;
|
| return ret;
|
| }
|
|
|
| @@ -1500,6 +1505,7 @@ void TraceLog::SetEnabled(const CategoryFilter& category_filter,
|
| void TraceLog::SetEventFilterPredicate(
|
| const TraceEvent::EventFilterPredicate& event_filter_predicate) {
|
| AutoLock lock(lock_);
|
| + DCHECK(!event_filter_predicate.is_null());
|
| event_filter_predicate_ = event_filter_predicate;
|
| }
|
|
|
| @@ -1507,6 +1513,8 @@ TraceLog::InternalTraceOptions TraceLog::GetInternalOptionsFromTraceOptions(
|
| const TraceOptions& options) {
|
| InternalTraceOptions ret =
|
| options.enable_sampling ? kInternalEnableSampling : kInternalNone;
|
| + if (options.enable_args_whitelist)
|
| + ret |= kInternalEnableArgsWhitelist;
|
| switch (options.record_mode) {
|
| case RECORD_UNTIL_FULL:
|
| return ret | kInternalRecordUntilFull;
|
| @@ -1530,6 +1538,7 @@ TraceOptions TraceLog::GetCurrentTraceOptions() const {
|
| TraceOptions ret;
|
| InternalTraceOptions option = trace_options();
|
| ret.enable_sampling = (option & kInternalEnableSampling) != 0;
|
| + ret.enable_args_whitelist = (option & kInternalEnableArgsWhitelist) != 0;
|
| if (option & kInternalRecordUntilFull)
|
| ret.record_mode = RECORD_UNTIL_FULL;
|
| else if (option & kInternalRecordContinuously)
|
|
|