Skip to content
This repository has been archived by the owner on Dec 29, 2022. It is now read-only.

Commit

Permalink
Changing wireId parameter to 32 bit
Browse files Browse the repository at this point in the history
Adressing issue:
#585
  • Loading branch information
iivlev committed Feb 26, 2017
1 parent 62bb60f commit 4519215
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions bindings/cpp/event.cc
Original file line number Diff line number Diff line change
Expand Up @@ -166,10 +166,10 @@ StandardEvents::CreateZoneEventType& StandardEvents::GetCreateZoneEvent() {
return event;
}

void StandardEvents::DefineEvent(EventBuffer* event_buffer, uint16_t wire_id,
void StandardEvents::DefineEvent(EventBuffer* event_buffer, uint32_t wire_id,
uint16_t event_class, uint32_t flags,
const char* name, const char* args) {
static EventEnabled<uint16_t, uint16_t, uint32_t, const char*, const char*>
static EventEnabled<uint32_t, uint16_t, uint32_t, const char*, const char*>
event{1, EventClass::kInstance,
EventFlags::kBuiltin | EventFlags::kInternal,
"wtf.event#define:wireId,eventClass,flags,name,args"};
Expand Down
2 changes: 1 addition & 1 deletion bindings/cpp/include/wtf/event.h
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ class StandardEvents {
static ScopeLeaveEventType& GetScopeLeaveEvent();
static CreateZoneEventType& GetCreateZoneEvent();

static void DefineEvent(EventBuffer* event_buffer, uint16_t wire_id,
static void DefineEvent(EventBuffer* event_buffer, uint32_t wire_id,
uint16_t event_class, uint32_t flags,
const char* name, const char* args);
static void ScopeLeave(EventBuffer* event_buffer);
Expand Down
4 changes: 2 additions & 2 deletions src/wtf/db/sources/chunkeddatasource.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ wtf.db.sources.ChunkedDataSource.prototype.setupBinaryDispatchTable_ =

// Add builtin events.
eventTypeTable.defineType(wtf.db.EventType.createInstance(
'wtf.event#define(uint16 wireId, uint16 eventClass, uint32 flags, ' +
'wtf.event#define(uint32 wireId, uint16 eventClass, uint32 flags, ' +
'ascii name, ascii args)',
wtf.data.EventFlag.BUILTIN | wtf.data.EventFlag.INTERNAL));
this.eventWireTable_[1] = eventTypeTable.getByName('wtf.event#define');
Expand Down Expand Up @@ -370,7 +370,7 @@ wtf.db.sources.ChunkedDataSource.prototype.processLegacyEventBuffer_ =
while (buffer.offset < buffer.capacity) {
// Read common event header.
var offset = buffer.offset;
var eventWireId = (data[offset++] << 8) | data[offset++];
var eventWireId = (data[offset++] << 24) | (data[offset++] << 16) | (data[offset++] << 8) | data[offset++] ;
var time =
(((data[offset++] << 24) >>> 0) |
(data[offset++] << 16) |
Expand Down
2 changes: 1 addition & 1 deletion src/wtf/trace/builtinevents.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ wtf.trace.BuiltinEvents = {
* This can occur multiple times in a stream and duplicates should be ignored.
*/
defineEvent: wtf.trace.events.createInstance(
'wtf.event#define(uint16 wireId, uint16 eventClass, uint32 flags, ' +
'wtf.event#define(uint32 wireId, uint16 eventClass, uint32 flags, ' +
'ascii name, ascii args)',
wtf.data.EventFlag.BUILTIN | wtf.data.EventFlag.INTERNAL),

Expand Down
2 changes: 1 addition & 1 deletion src/wtf/trace/eventtype.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ wtf.trace.EventType = function(name, eventClass, flags, opt_args) {
* @type {number}
* @private
*/
wtf.trace.EventType.MAX_EVENT_WIRE_ID_ = 0xFFFF;
wtf.trace.EventType.MAX_EVENT_WIRE_ID_ = 0xFFFFFFFF;


/**
Expand Down

0 comments on commit 4519215

Please sign in to comment.