Bug 1091479, Patch 1: Log dispatch time when creating a source event, r=sinker.

This commit is contained in:
Gina Yeh 2014-11-24 09:47:13 +08:00
Родитель a11f5f8a17
Коммит edd3d46514
2 изменённых файлов: 29 добавлений и 1 удалений

Просмотреть файл

@ -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);
}

Просмотреть файл

@ -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)