mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-26 20:30:41 +00:00
Backed out changeset 8d040e2b9aff (bug 1072903)
This commit is contained in:
parent
79c6828d56
commit
f9ede388b0
@ -79,19 +79,13 @@ rdtsc(void)
|
||||
|
||||
TraceLogging traceLoggers;
|
||||
|
||||
static const char *
|
||||
TLTextIdString(TraceLogger::TextId id)
|
||||
static const char* const text[] =
|
||||
{
|
||||
switch (id) {
|
||||
case TraceLogger::TL_Error:
|
||||
return "TraceLogger failed to process text";
|
||||
#define NAME(textId) case TraceLogger::textId: return #textId;
|
||||
TRACELOGGER_TEXT_ID_LIST(NAME)
|
||||
"TraceLogger failed to process text",
|
||||
#define NAME(x) #x,
|
||||
TRACELOGGER_TEXT_ID_LIST(NAME)
|
||||
#undef NAME
|
||||
default:
|
||||
MOZ_CRASH();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
TraceLogger::TraceLogger()
|
||||
: enabled(0),
|
||||
@ -161,8 +155,7 @@ TraceLogger::init(uint32_t loggerId)
|
||||
|
||||
// Eagerly create the default textIds, to match their Tracelogger::TextId.
|
||||
for (uint32_t i = 0; i < LAST; i++) {
|
||||
TraceLogger::TextId id = TraceLogger::TextId(i);
|
||||
mozilla::DebugOnly<uint32_t> textId = createTextId(TLTextIdString(id));
|
||||
mozilla::DebugOnly<uint32_t> textId = createTextId(text[i]);
|
||||
MOZ_ASSERT(textId == i);
|
||||
}
|
||||
|
||||
@ -810,10 +803,9 @@ TraceLogging::lazyInit()
|
||||
"Specific log items:\n"
|
||||
);
|
||||
for (uint32_t i = 1; i < TraceLogger::LAST; i++) {
|
||||
TraceLogger::TextId id = TraceLogger::TextId(i);
|
||||
if (!TraceLogger::textIdIsToggable(id))
|
||||
if (!TraceLogger::textIdIsToggable(i))
|
||||
continue;
|
||||
printf(" %s\n", TLTextIdString(id));
|
||||
printf(" %s\n", text[i]);
|
||||
}
|
||||
printf("\n");
|
||||
exit(0);
|
||||
@ -821,9 +813,8 @@ TraceLogging::lazyInit()
|
||||
}
|
||||
|
||||
for (uint32_t i = 1; i < TraceLogger::LAST; i++) {
|
||||
TraceLogger::TextId id = TraceLogger::TextId(i);
|
||||
if (TraceLogger::textIdIsToggable(id))
|
||||
enabledTextIds[i] = ContainsFlag(env, TLTextIdString(id));
|
||||
if (TraceLogger::textIdIsToggable(i))
|
||||
enabledTextIds[i] = ContainsFlag(env, text[i]);
|
||||
else
|
||||
enabledTextIds[i] = true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user