mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 11:55:49 +00:00
Bug 1091479, Patch 1: Log dispatch time when creating a source event, r=sinker.
This commit is contained in:
parent
a11f5f8a17
commit
edd3d46514
@ -99,8 +99,25 @@ CreateSourceEvent(SourceEventType aType)
|
||||
info->mCurTraceSourceType = aType;
|
||||
info->mCurTaskId = newId;
|
||||
|
||||
int* namePtr;
|
||||
#define SOURCE_EVENT_NAME(type) \
|
||||
case SourceEventType::type: \
|
||||
{ \
|
||||
static int CreateSourceEvent##type; \
|
||||
namePtr = &CreateSourceEvent##type; \
|
||||
break; \
|
||||
}
|
||||
|
||||
switch (aType) {
|
||||
#include "SourceEventTypeMap.h"
|
||||
default:
|
||||
MOZ_CRASH(false);
|
||||
};
|
||||
#undef CREATE_SOURCE_EVENT_NAME
|
||||
|
||||
// Log a fake dispatch and start for this source event.
|
||||
LogDispatch(newId, newId,newId, aType);
|
||||
LogDispatch(newId, newId, newId, aType);
|
||||
LogVirtualTablePtr(newId, newId, namePtr);
|
||||
LogBegin(newId, newId);
|
||||
}
|
||||
|
||||
|
11
tools/profiler/SourceEventTypeMap.h
Normal file
11
tools/profiler/SourceEventTypeMap.h
Normal file
@ -0,0 +1,11 @@
|
||||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this file,
|
||||
* You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
SOURCE_EVENT_NAME(Unknown)
|
||||
SOURCE_EVENT_NAME(Touch)
|
||||
SOURCE_EVENT_NAME(Mouse)
|
||||
SOURCE_EVENT_NAME(Key)
|
||||
SOURCE_EVENT_NAME(Bluetooth)
|
||||
SOURCE_EVENT_NAME(Unixsocket)
|
||||
SOURCE_EVENT_NAME(Wifi)
|
Loading…
Reference in New Issue
Block a user