|
|
Created:
6 years, 4 months ago by nednguyen Modified:
6 years, 4 months ago CC:
chromium-reviews, darin-cc_chromium.org, dsinclair+watch_chromium.org, erikwright+watch_chromium.org, jam, wfh+watch_chromium.org Base URL:
https://chromium.googlesource.com/chromium/src.git@master Project:
chromium Visibility:
Public. |
DescriptionRemove TraceOptions string based constructor. Add setter method
SetFromString that allows setting TraceOptions from a string instead.
SetFromString returns true upon success.
BUG=400382
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=288193
Patch Set 1 : #Patch Set 2 : Rebase #
Messages
Total messages: 26 (0 generated)
This seems like it's working around the fact that the iOS simulator sent us something we don't understand. Do we know what the input was from the simulator? Why did we fail the test?
On 2014/08/05 14:56:38, dsinclair wrote: > This seems like it's working around the fact that the iOS simulator sent us > something we don't understand. Do we know what the input was from the simulator? > Why did we fail the test? The ios stacktrace: http://build.chromium.org/p/chromium.mac/builders/iOS%20Simulator%20%28dbg%29... This might fix the failure on iOS, but I also think it's the better way to set TraceOptions from string. Putting the NOTREACHED() in trace_event_impl.cc was a bad idea, the callsite should be responsible for dealing with trace option parsing error.
lgtm tho it surprises me how few callsites there are -- shouldn't the android ingress point be using this? and the tracing_ui ingress point?
On 2014/08/05 21:21:14, nduca wrote: > lgtm tho it surprises me how few callsites there are -- shouldn't the android > ingress point be using this? and the tracing_ui ingress point? android one uses it through tracing_controller_android. For tracing_ui.cc, I need to fix the javascript traceviewer to be able to take recording mode as a string. Right now, it just check: if json_data["useContinuousTracing"] == true, then use record continuously.
The CQ bit was checked by nednguyen@google.com
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nednguyen@google.com/443523003/40001
+Xianzhu for android related change.
On 2014/08/05 22:18:38, nednguyen wrote: > +Xianzhu for android related change. lgtm.
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: chromium_presubmit on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presub...) linux_chromium_chromeos_rel_swarming on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_...)
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presub...)
+Sammi for tracing_controller_android.cc
content/browser/android/tracing_controller_android.cc lgtm.
The CQ bit was checked by nednguyen@google.com
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nednguyen@google.com/443523003/40001
The CQ bit was unchecked by commit-bot@chromium.org
Failed to apply patch for base/debug/trace_event_unittest.cc: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file base/debug/trace_event_unittest.cc Hunk #1 FAILED at 2995. Hunk #2 succeeded at 3066 (offset 10 lines). 1 out of 2 hunks FAILED -- saving rejects to file base/debug/trace_event_unittest.cc.rej Patch: base/debug/trace_event_unittest.cc Index: base/debug/trace_event_unittest.cc diff --git a/base/debug/trace_event_unittest.cc b/base/debug/trace_event_unittest.cc index 566a65e6bc7a18cdc6dd9c49966adc1577fed640..02407fdc91a9bc4a9841ac91c6a9ab084f4df9d9 100644 --- a/base/debug/trace_event_unittest.cc +++ b/base/debug/trace_event_unittest.cc @@ -2995,51 +2995,51 @@ TEST_F(TraceEventTestFixture, SyntheticDelayConfigurationToString) { EXPECT_EQ(config, filter.ToString()); } -TEST(TraceOptionsTest, DISABLED_TraceOptionsFromString) { - TraceOptions options = TraceOptions("record-until-full"); +TEST(TraceOptionsTest, TraceOptionsFromString) { + TraceOptions options; + EXPECT_TRUE(options.SetFromString("record-until-full")); EXPECT_EQ(RECORD_UNTIL_FULL, options.record_mode); EXPECT_FALSE(options.enable_sampling); EXPECT_FALSE(options.enable_systrace); - options = TraceOptions(RECORD_CONTINUOUSLY); + EXPECT_TRUE(options.SetFromString("record-continuously")); EXPECT_EQ(RECORD_CONTINUOUSLY, options.record_mode); EXPECT_FALSE(options.enable_sampling); EXPECT_FALSE(options.enable_systrace); - options = TraceOptions("trace-to-console"); + EXPECT_TRUE(options.SetFromString("trace-to-console")); EXPECT_EQ(ECHO_TO_CONSOLE, options.record_mode); EXPECT_FALSE(options.enable_sampling); EXPECT_FALSE(options.enable_systrace); - options = TraceOptions("record-until-full, enable-sampling"); + EXPECT_TRUE(options.SetFromString("record-until-full, enable-sampling")); EXPECT_EQ(RECORD_UNTIL_FULL, options.record_mode); EXPECT_TRUE(options.enable_sampling); EXPECT_FALSE(options.enable_systrace); - options = TraceOptions("enable-systrace,record-continuously"); + EXPECT_TRUE(options.SetFromString("enable-systrace,record-continuously")); EXPECT_EQ(RECORD_CONTINUOUSLY, options.record_mode); EXPECT_FALSE(options.enable_sampling); EXPECT_TRUE(options.enable_systrace); - options = TraceOptions("enable-systrace, trace-to-console,enable-sampling"); + EXPECT_TRUE(options.SetFromString( + "enable-systrace, trace-to-console,enable-sampling")); EXPECT_EQ(ECHO_TO_CONSOLE, options.record_mode); EXPECT_TRUE(options.enable_sampling); EXPECT_TRUE(options.enable_systrace); - options = - TraceOptions("record-continuously,record-until-full,trace-to-console"); + EXPECT_TRUE(options.SetFromString( + "record-continuously,record-until-full,trace-to-console")); EXPECT_EQ(ECHO_TO_CONSOLE, options.record_mode); EXPECT_FALSE(options.enable_systrace); EXPECT_FALSE(options.enable_sampling); - options = TraceOptions(""); + EXPECT_TRUE(options.SetFromString("")); EXPECT_EQ(RECORD_UNTIL_FULL, options.record_mode); EXPECT_FALSE(options.enable_systrace); EXPECT_FALSE(options.enable_sampling); -#if GTEST_HAS_EXCEPTIONS - EXPECT_THROW(TraceOptions("foo-bar-baz"), int); -#endif + EXPECT_FALSE(options.SetFromString("foo-bar-baz")); } TEST(TraceOptionsTest, TraceOptionsToString) { @@ -3056,7 +3056,8 @@ TEST(TraceOptionsTest, TraceOptionsToString) { TraceOptions original_option = TraceOptions(modes[i]); original_option.enable_sampling = enable_sampling_options[j]; original_option.enable_systrace = enable_systrace_options[k]; - TraceOptions new_options = TraceOptions(original_option.ToString()); + TraceOptions new_options; + EXPECT_TRUE(new_options.SetFromString(original_option.ToString())); EXPECT_EQ(original_option.record_mode, new_options.record_mode); EXPECT_EQ(original_option.enable_sampling, new_options.enable_sampling); EXPECT_EQ(original_option.enable_systrace, new_options.enable_systrace);
The CQ bit was checked by nednguyen@google.com
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nednguyen@google.com/443523003/60001
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_gpu on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/win_gpu/builds/43821) win8_chromium_rel on tryserver.chromium.win (http://build.chromium.org/p/tryserver.chromium.win/builders/win8_chromium_rel...) win_chromium_compile_dbg on tryserver.chromium.win (http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_comp...) win_chromium_rel on tryserver.chromium.win (http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel/...) win_chromium_x64_rel on tryserver.chromium.win (http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_...)
The CQ bit was unchecked by commit-bot@chromium.org
Failed to request the patch to try. Please note that binary files are still unsupported at the moment, this is being worked on. Thanks for your patience. Transient error: <urlopen error [Errno 104] Connection reset by peer>
The CQ bit was checked by nednguyen@google.com
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nednguyen@google.com/443523003/60001
Message was sent while issue was closed.
Change committed as 288193 |