Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(730)

Issue 24047007: Fix --trace-shutdown with thread-local tracing. (Closed)

Created:
7 years, 3 months ago by Xianzhu
Modified:
7 years, 3 months ago
Reviewers:
dsinclair, nduca, jam
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, dsinclair+watch_chromium.org, erikwright+watch_chromium.org
Visibility:
Public.

Description

Fix --trace-shutdown with thread-local tracing. With thread-local tracing (r221766), TraceLog::Flush() is async and needs to be called from a thread having a message loop. It also requires that tracing has been stopped. BrowserShutdownProfileDumper is a special caller that TraceLog::Flush() was originally called from a thread without message loop. Now start another thread for flushing, and call TraceLog::SetDisabled() before TraceLog::Flush(). The calling thread needs to wait for the completion of the flush, otherwise the browser may shutdown before all trace events written. Temporarily allow the thread to wait in ThreadRestrictions. BUG=none TEST=manual run chrome with --trace-shutdown. Should not assert. Should generate correct trace file. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=223819

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+38 lines, -2 lines) Patch
M base/debug/trace_event_impl.cc View 1 chunk +1 line, -0 lines 0 comments Download
M base/threading/thread_restrictions.h View 2 chunks +2 lines, -0 lines 0 comments Download
M content/browser/browser_shutdown_profile_dumper.h View 2 chunks +4 lines, -0 lines 0 comments Download
M content/browser/browser_shutdown_profile_dumper.cc View 4 chunks +31 lines, -2 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
Xianzhu
7 years, 3 months ago (2013-09-14 00:17:20 UTC) #1
jam
can you get someone familiar with tracing internals to review this? i can rubberstamp after
7 years, 3 months ago (2013-09-16 16:42:14 UTC) #2
Xianzhu
+nduca for trace_event.
7 years, 3 months ago (2013-09-16 16:51:19 UTC) #3
Xianzhu
7 years, 3 months ago (2013-09-17 18:27:22 UTC) #4
nduca
lgtm
7 years, 3 months ago (2013-09-17 19:32:31 UTC) #5
jam
lgtm
7 years, 3 months ago (2013-09-17 20:24:38 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wangxianzhu@chromium.org/24047007/1
7 years, 3 months ago (2013-09-17 23:14:12 UTC) #7
commit-bot: I haz the power
Retried try job too often on win_rel for step(s) browser_tests, chrome_frame_net_tests, chrome_frame_tests, chrome_frame_unittests, content_browsertests, mini_installer_test, ...
7 years, 3 months ago (2013-09-18 02:54:33 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/wangxianzhu@chromium.org/24047007/1
7 years, 3 months ago (2013-09-18 03:57:52 UTC) #9
commit-bot: I haz the power
7 years, 3 months ago (2013-09-18 08:15:49 UTC) #10
Message was sent while issue was closed.
Change committed as 223819

Powered by Google App Engine
This is Rietveld 408576698