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

Issue 241833002: Cast: Limit number of events/packets in EncodingEventSubscriber protos. (Closed)

Created:
6 years, 8 months ago by imcheng
Modified:
6 years, 8 months ago
Reviewers:
Alpha Left Google
CC:
chromium-reviews, hclam+watch_chromium.org, imcheng+watch_chromium.org, hguihot+watch_chromium.org, jasonroberts+watch_google.com, avayvod+watch_chromium.org, pwestin+watch_google.com, feature-media-reviews_chromium.org, jshin+watch_chromium.org, miu+watch_chromium.org, hubbe+watch_chromium.org, mikhal+watch_chromium.org, hguihot1
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Cast: Limit number of events/packets in EncodingEventSubscriber protos. There is now a limit on number of events per proto (AggregatedFrameEvent and BasePacketEvent). There is also a limit on number of packets per frame (i.e. number of BasePacketEvent in AggregatedPacketEvent). If either limit is exceeded, a new proto will be created for that frame. The underlying implementation of EncodingEventSubscriber is also changed. When the internal map reaches a certain size, its old entries will be transferred to a vector for storage. This is done to keep the map small and lookup fast. A proto will also be transferred to storage if adding an event to it would result in exceeding the limit stated above. The scheme is not perfect, but such situation rarely happens in practice. Also changed deserialization to be able to merge protos of the same frame. This is done to keep protos size in check. Also, LogSerializer will now fail DCHECK if the protos exceed the maximum size 2^16 - 1. (Because we encode size as 16 bits). BUG= Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=266289

Patch Set 1 #

Patch Set 2 : #

Total comments: 9

Patch Set 3 : Use extra proto #

Patch Set 4 : #

Patch Set 5 : #

Total comments: 2

Patch Set 6 : addressed comment #

Patch Set 7 : rebase #

Patch Set 8 : fix merge #

Unified diffs Side-by-side diffs Delta from patch set Stats (+457 lines, -202 lines) Patch
M chrome/renderer/media/cast_session_delegate.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M media/cast/logging/encoding_event_subscriber.h View 1 2 3 4 5 6 3 chunks +47 lines, -14 lines 0 comments Download
M media/cast/logging/encoding_event_subscriber.cc View 1 2 3 4 5 6 7 5 chunks +175 lines, -80 lines 0 comments Download
M media/cast/logging/encoding_event_subscriber_unittest.cc View 1 2 3 4 5 6 16 chunks +114 lines, -43 lines 0 comments Download
M media/cast/logging/log_deserializer.h View 1 2 1 chunk +11 lines, -2 lines 0 comments Download
M media/cast/logging/log_deserializer.cc View 1 2 5 chunks +52 lines, -12 lines 0 comments Download
M media/cast/logging/log_serializer.h View 1 2 2 chunks +2 lines, -3 lines 0 comments Download
M media/cast/logging/log_serializer.cc View 1 2 3 6 chunks +25 lines, -14 lines 0 comments Download
M media/cast/logging/serialize_deserialize_test.cc View 1 2 8 chunks +25 lines, -28 lines 0 comments Download
M media/cast/test/sender.cc View 1 2 3 4 5 6 2 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
imcheng
6 years, 8 months ago (2014-04-17 22:23:44 UTC) #1
Alpha Left Google
Do we actually see this often?
6 years, 8 months ago (2014-04-17 22:24:48 UTC) #2
imcheng
Herve showed me a couple of logs yesterday that had this problem, which messed up ...
6 years, 8 months ago (2014-04-17 22:25:27 UTC) #3
Alpha Left Google
On 2014/04/17 22:25:27, imcheng1 wrote: > Herve showed me a couple of logs yesterday that ...
6 years, 8 months ago (2014-04-17 22:28:30 UTC) #4
imcheng
I was able to reproduce this using the cast_sender_app / cast_receiver_app. It seems the sender ...
6 years, 8 months ago (2014-04-17 22:42:00 UTC) #5
Alpha Left Google
https://codereview.chromium.org/241833002/diff/20001/media/cast/logging/encoding_event_subscriber.h File media/cast/logging/encoding_event_subscriber.h (right): https://codereview.chromium.org/241833002/diff/20001/media/cast/logging/encoding_event_subscriber.h#newcode29 media/cast/logging/encoding_event_subscriber.h:29: const int kMaxPacketsPerFrame = 64; This number seems small. ...
6 years, 8 months ago (2014-04-17 22:58:59 UTC) #6
imcheng
https://codereview.chromium.org/241833002/diff/20001/media/cast/logging/encoding_event_subscriber.h File media/cast/logging/encoding_event_subscriber.h (right): https://codereview.chromium.org/241833002/diff/20001/media/cast/logging/encoding_event_subscriber.h#newcode29 media/cast/logging/encoding_event_subscriber.h:29: const int kMaxPacketsPerFrame = 64; On 2014/04/17 22:59:00, Alpha ...
6 years, 8 months ago (2014-04-18 00:05:30 UTC) #7
Alpha Left Google
If the limit for a proto is 64kbytes the limit seems very small compared to ...
6 years, 8 months ago (2014-04-21 18:14:04 UTC) #8
imcheng
Per offline discussion, an extra proto will be created if the proto exceeds either of ...
6 years, 8 months ago (2014-04-22 01:17:38 UTC) #9
Alpha Left Google
https://codereview.chromium.org/241833002/diff/70001/media/cast/logging/encoding_event_subscriber.cc File media/cast/logging/encoding_event_subscriber.cc (right): https://codereview.chromium.org/241833002/diff/70001/media/cast/logging/encoding_event_subscriber.cc#newcode227 media/cast/logging/encoding_event_subscriber.cc:227: for (size_t i = 0; i < num_entries; i++, ...
6 years, 8 months ago (2014-04-22 18:20:41 UTC) #10
imcheng
https://codereview.chromium.org/241833002/diff/70001/media/cast/logging/encoding_event_subscriber.cc File media/cast/logging/encoding_event_subscriber.cc (right): https://codereview.chromium.org/241833002/diff/70001/media/cast/logging/encoding_event_subscriber.cc#newcode227 media/cast/logging/encoding_event_subscriber.cc:227: for (size_t i = 0; i < num_entries; i++, ...
6 years, 8 months ago (2014-04-22 19:29:33 UTC) #11
Alpha Left Google
lgtm
6 years, 8 months ago (2014-04-22 19:55:13 UTC) #12
imcheng
The CQ bit was checked by imcheng@chromium.org
6 years, 8 months ago (2014-04-25 08:11:27 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/imcheng@chromium.org/241833002/130001
6 years, 8 months ago (2014-04-25 08:32:05 UTC) #14
commit-bot: I haz the power
6 years, 8 months ago (2014-04-25 23:39:51 UTC) #15
Message was sent while issue was closed.
Change committed as 266289

Powered by Google App Engine
This is Rietveld 408576698