зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1328369 - Remove tlsStackTop and set_tls_stack_top. r=mstange.
They are unused. --HG-- extra : rebase_source : 1dd53c26f07c828102b3c12122d22bb1b0e74f3f
This commit is contained in:
Родитель
eee9038a2f
Коммит
a0ab21e630
|
@ -66,7 +66,6 @@ public:
|
||||||
|
|
||||||
MOZ_THREAD_LOCAL(PseudoStack *) tlsPseudoStack;
|
MOZ_THREAD_LOCAL(PseudoStack *) tlsPseudoStack;
|
||||||
MOZ_THREAD_LOCAL(GeckoSampler *) tlsTicker;
|
MOZ_THREAD_LOCAL(GeckoSampler *) tlsTicker;
|
||||||
MOZ_THREAD_LOCAL(void *) tlsStackTop;
|
|
||||||
// We need to track whether we've been initialized otherwise
|
// We need to track whether we've been initialized otherwise
|
||||||
// we end up using tlsStack without initializing it.
|
// we end up using tlsStack without initializing it.
|
||||||
// Because tlsStack is totally opaque to us we can't reuse
|
// Because tlsStack is totally opaque to us we can't reuse
|
||||||
|
@ -170,8 +169,6 @@ Sampler::RegisterCurrentThread(const char* aName,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
set_tls_stack_top(stackTop);
|
|
||||||
|
|
||||||
ThreadInfo* info = new StackOwningThreadInfo(aName, id,
|
ThreadInfo* info = new StackOwningThreadInfo(aName, id,
|
||||||
aIsMainThread, aPseudoStack, stackTop);
|
aIsMainThread, aPseudoStack, stackTop);
|
||||||
|
|
||||||
|
@ -190,8 +187,6 @@ Sampler::UnregisterCurrentThread()
|
||||||
if (!sRegisteredThreadsMutex)
|
if (!sRegisteredThreadsMutex)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
tlsStackTop.set(nullptr);
|
|
||||||
|
|
||||||
::MutexAutoLock lock(*sRegisteredThreadsMutex);
|
::MutexAutoLock lock(*sRegisteredThreadsMutex);
|
||||||
|
|
||||||
Thread::tid_t id = Thread::GetCurrentId();
|
Thread::tid_t id = Thread::GetCurrentId();
|
||||||
|
@ -452,19 +447,6 @@ void profiler_usage() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
void set_tls_stack_top(void* stackTop)
|
|
||||||
{
|
|
||||||
// Round |stackTop| up to the end of the containing page. We may
|
|
||||||
// as well do this -- there's no danger of a fault, and we might
|
|
||||||
// get a few more base-of-the-stack frames as a result. This
|
|
||||||
// assumes that no target has a page size smaller than 4096.
|
|
||||||
uintptr_t stackTopR = (uintptr_t)stackTop;
|
|
||||||
if (stackTop) {
|
|
||||||
stackTopR = (stackTopR & ~(uintptr_t)4095) + (uintptr_t)4095;
|
|
||||||
}
|
|
||||||
tlsStackTop.set((void*)stackTopR);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool is_main_thread_name(const char* aName) {
|
bool is_main_thread_name(const char* aName) {
|
||||||
if (!aName) {
|
if (!aName) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -526,7 +508,7 @@ void mozilla_sampler_init(void* stackTop)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
LOG("BEGIN mozilla_sampler_init");
|
LOG("BEGIN mozilla_sampler_init");
|
||||||
if (!tlsPseudoStack.init() || !tlsTicker.init() || !tlsStackTop.init()) {
|
if (!tlsPseudoStack.init() || !tlsTicker.init()) {
|
||||||
LOG("Failed to init.");
|
LOG("Failed to init.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -267,8 +267,6 @@ bool set_profiler_entries(const char*);
|
||||||
bool set_profiler_scan(const char*);
|
bool set_profiler_scan(const char*);
|
||||||
bool is_native_unwinding_avail();
|
bool is_native_unwinding_avail();
|
||||||
|
|
||||||
void set_tls_stack_top(void* stackTop);
|
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// Sampler
|
// Sampler
|
||||||
//
|
//
|
||||||
|
|
|
@ -34,7 +34,6 @@ class TimeStamp;
|
||||||
|
|
||||||
extern MOZ_THREAD_LOCAL(PseudoStack *) tlsPseudoStack;
|
extern MOZ_THREAD_LOCAL(PseudoStack *) tlsPseudoStack;
|
||||||
extern MOZ_THREAD_LOCAL(GeckoSampler *) tlsTicker;
|
extern MOZ_THREAD_LOCAL(GeckoSampler *) tlsTicker;
|
||||||
extern MOZ_THREAD_LOCAL(void *) tlsStackTop;
|
|
||||||
extern bool stack_key_initialized;
|
extern bool stack_key_initialized;
|
||||||
|
|
||||||
#ifndef SAMPLE_FUNCTION_NAME
|
#ifndef SAMPLE_FUNCTION_NAME
|
||||||
|
|
Загрузка…
Ссылка в новой задаче