Bug 1328369 - Remove tlsStackTop and set_tls_stack_top. r=mstange.

They are unused.

--HG--
extra : rebase_source : 1dd53c26f07c828102b3c12122d22bb1b0e74f3f
This commit is contained in:
Nicholas Nethercote 2017-01-19 08:07:23 +11:00
Родитель eee9038a2f
Коммит a0ab21e630
3 изменённых файлов: 1 добавлений и 22 удалений

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

@ -66,7 +66,6 @@ public:
MOZ_THREAD_LOCAL(PseudoStack *) tlsPseudoStack;
MOZ_THREAD_LOCAL(GeckoSampler *) tlsTicker;
MOZ_THREAD_LOCAL(void *) tlsStackTop;
// We need to track whether we've been initialized otherwise
// we end up using tlsStack without initializing it.
// 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,
aIsMainThread, aPseudoStack, stackTop);
@ -190,8 +187,6 @@ Sampler::UnregisterCurrentThread()
if (!sRegisteredThreadsMutex)
return;
tlsStackTop.set(nullptr);
::MutexAutoLock lock(*sRegisteredThreadsMutex);
Thread::tid_t id = Thread::GetCurrentId();
@ -452,19 +447,6 @@ void profiler_usage() {
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) {
if (!aName) {
return false;
@ -526,7 +508,7 @@ void mozilla_sampler_init(void* stackTop)
#endif
LOG("BEGIN mozilla_sampler_init");
if (!tlsPseudoStack.init() || !tlsTicker.init() || !tlsStackTop.init()) {
if (!tlsPseudoStack.init() || !tlsTicker.init()) {
LOG("Failed to init.");
return;
}

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

@ -267,8 +267,6 @@ bool set_profiler_entries(const char*);
bool set_profiler_scan(const char*);
bool is_native_unwinding_avail();
void set_tls_stack_top(void* stackTop);
// ----------------------------------------------------------------------------
// Sampler
//

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

@ -34,7 +34,6 @@ class TimeStamp;
extern MOZ_THREAD_LOCAL(PseudoStack *) tlsPseudoStack;
extern MOZ_THREAD_LOCAL(GeckoSampler *) tlsTicker;
extern MOZ_THREAD_LOCAL(void *) tlsStackTop;
extern bool stack_key_initialized;
#ifndef SAMPLE_FUNCTION_NAME