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

Issue 1131543003: Avoid emptry tracing callbacks when possible. (Closed)

Created:
5 years, 7 months ago by hubbe
Modified:
5 years, 6 months ago
CC:
chromium-reviews, erikwright+watch_chromium.org, tracing+reviews_chromium.org, wfh+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Avoid emptry tracing callbacks when possible. The current code can end up calling the flush callback with an empty data string, even though there is more data to be processed. This doesn't match the description in the comments and can confuse the receiving code. This Cl fixes that, and also simplifies the code a bit. BUG=481764 Committed: https://crrev.com/90388fdeec253d178bb69366f6222c71f9cc38a4 Cr-Commit-Position: refs/heads/master@{#334421}

Patch Set 1 #

Patch Set 2 : refcounting error fixed #

Total comments: 2

Patch Set 3 : test added #

Total comments: 7

Patch Set 4 : merged #

Patch Set 5 : merge oops fixed #

Patch Set 6 : merged & tested #

Unified diffs Side-by-side diffs Delta from patch set Stats (+56 lines, -17 lines) Patch
M base/trace_event/trace_event_impl.cc View 1 2 3 4 1 chunk +13 lines, -17 lines 0 comments Download
M base/trace_event/trace_event_unittest.cc View 1 2 3 4 5 4 chunks +43 lines, -0 lines 0 comments Download

Messages

Total messages: 28 (7 generated)
hubbe
5 years, 7 months ago (2015-05-07 00:12:24 UTC) #2
Ken Russell (switch to Gerrit)
Thanks for fixing this. LGTM, but I'm not an owner.
5 years, 7 months ago (2015-05-08 01:14:34 UTC) #4
dsinclair
Can you give me a bit more context for this, the description is pretty sparse. ...
5 years, 7 months ago (2015-05-08 13:13:12 UTC) #5
Ken Russell (switch to Gerrit)
On 2015/05/08 13:13:12, (OOO until May 19th) dsinclair wrote: > Can you give me a ...
5 years, 7 months ago (2015-05-08 18:54:28 UTC) #6
Ken Russell (switch to Gerrit)
https://codereview.chromium.org/1131543003/diff/20001/base/trace_event/trace_event_impl.cc File base/trace_event/trace_event_impl.cc (right): https://codereview.chromium.org/1131543003/diff/20001/base/trace_event/trace_event_impl.cc#newcode1772 base/trace_event/trace_event_impl.cc:1772: json_events_str_ptr = new RefCountedString(); What happens if this is ...
5 years, 7 months ago (2015-05-08 18:54:34 UTC) #7
hubbe
https://codereview.chromium.org/1131543003/diff/20001/base/trace_event/trace_event_impl.cc File base/trace_event/trace_event_impl.cc (right): https://codereview.chromium.org/1131543003/diff/20001/base/trace_event/trace_event_impl.cc#newcode1772 base/trace_event/trace_event_impl.cc:1772: json_events_str_ptr = new RefCountedString(); On 2015/05/08 18:54:34, Ken Russell ...
5 years, 7 months ago (2015-05-08 18:58:14 UTC) #8
hubbe
On 2015/05/08 18:58:14, hubbe wrote: > https://codereview.chromium.org/1131543003/diff/20001/base/trace_event/trace_event_impl.cc > File base/trace_event/trace_event_impl.cc (right): > > https://codereview.chromium.org/1131543003/diff/20001/base/trace_event/trace_event_impl.cc#newcode1772 > ...
5 years, 7 months ago (2015-05-12 17:17:48 UTC) #9
nduca
seems like a unit test would be nice....
5 years, 7 months ago (2015-05-15 18:41:44 UTC) #10
hubbe
On 2015/05/15 18:41:44, nduca wrote: > seems like a unit test would be nice.... Test ...
5 years, 7 months ago (2015-05-18 21:51:52 UTC) #11
dsinclair
https://codereview.chromium.org/1131543003/diff/40001/base/trace_event/trace_event_unittest.cc File base/trace_event/trace_event_unittest.cc (right): https://codereview.chromium.org/1131543003/diff/40001/base/trace_event/trace_event_unittest.cc#newcode1116 base/trace_event/trace_event_unittest.cc:1116: This test is .... complicated. Can we simplify it? ...
5 years, 7 months ago (2015-05-25 13:51:11 UTC) #12
hubbe
https://codereview.chromium.org/1131543003/diff/40001/base/trace_event/trace_event_unittest.cc File base/trace_event/trace_event_unittest.cc (right): https://codereview.chromium.org/1131543003/diff/40001/base/trace_event/trace_event_unittest.cc#newcode1116 base/trace_event/trace_event_unittest.cc:1116: On 2015/05/25 13:51:11, dsinclair wrote: > This test is ...
5 years, 6 months ago (2015-06-10 21:55:32 UTC) #13
dsinclair
https://codereview.chromium.org/1131543003/diff/40001/base/trace_event/trace_event_impl.cc File base/trace_event/trace_event_impl.cc (right): https://codereview.chromium.org/1131543003/diff/40001/base/trace_event/trace_event_impl.cc#newcode1779 base/trace_event/trace_event_impl.cc:1779: flush_output_callback.Run(json_events_str_ptr, false); Doesn't this new code do the same ...
5 years, 6 months ago (2015-06-11 13:54:39 UTC) #14
hubbe
https://codereview.chromium.org/1131543003/diff/40001/base/trace_event/trace_event_impl.cc File base/trace_event/trace_event_impl.cc (right): https://codereview.chromium.org/1131543003/diff/40001/base/trace_event/trace_event_impl.cc#newcode1779 base/trace_event/trace_event_impl.cc:1779: flush_output_callback.Run(json_events_str_ptr, false); On 2015/06/11 13:54:39, dsinclair wrote: > Doesn't ...
5 years, 6 months ago (2015-06-11 17:30:01 UTC) #15
dsinclair
https://codereview.chromium.org/1131543003/diff/40001/base/trace_event/trace_event_impl.cc File base/trace_event/trace_event_impl.cc (right): https://codereview.chromium.org/1131543003/diff/40001/base/trace_event/trace_event_impl.cc#newcode1779 base/trace_event/trace_event_impl.cc:1779: flush_output_callback.Run(json_events_str_ptr, false); On 2015/06/11 17:30:01, hubbe wrote: > On ...
5 years, 6 months ago (2015-06-11 19:19:29 UTC) #16
hubbe
https://codereview.chromium.org/1131543003/diff/40001/base/trace_event/trace_event_impl.cc File base/trace_event/trace_event_impl.cc (right): https://codereview.chromium.org/1131543003/diff/40001/base/trace_event/trace_event_impl.cc#newcode1779 base/trace_event/trace_event_impl.cc:1779: flush_output_callback.Run(json_events_str_ptr, false); On 2015/06/11 19:19:29, dsinclair wrote: > On ...
5 years, 6 months ago (2015-06-11 21:39:58 UTC) #17
dsinclair
lgtm https://codereview.chromium.org/1131543003/diff/40001/base/trace_event/trace_event_impl.cc File base/trace_event/trace_event_impl.cc (right): https://codereview.chromium.org/1131543003/diff/40001/base/trace_event/trace_event_impl.cc#newcode1779 base/trace_event/trace_event_impl.cc:1779: flush_output_callback.Run(json_events_str_ptr, false); On 2015/06/11 at 21:39:58, hubbe wrote: ...
5 years, 6 months ago (2015-06-12 13:48:35 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1131543003/40001
5 years, 6 months ago (2015-06-12 13:49:09 UTC) #21
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_compile_dbg_32_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_compile_dbg_32_ng/builds/62485) ios_dbg_simulator_ninja on tryserver.chromium.mac (JOB_FAILED, ...
5 years, 6 months ago (2015-06-12 13:53:08 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1131543003/80002
5 years, 6 months ago (2015-06-15 18:12:45 UTC) #26
commit-bot: I haz the power
Committed patchset #6 (id:80002)
5 years, 6 months ago (2015-06-15 18:39:27 UTC) #27
commit-bot: I haz the power
5 years, 6 months ago (2015-06-15 18:40:29 UTC) #28
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/90388fdeec253d178bb69366f6222c71f9cc38a4
Cr-Commit-Position: refs/heads/master@{#334421}

Powered by Google App Engine
This is Rietveld 408576698