Bug 1135236 - Remove unused print callbacks in profiler backend. r=mstange

This commit is contained in:
Kannan Vijayan 2015-03-20 13:51:37 -04:00
parent c16b7fe9a5
commit 1c1b022893
4 changed files with 0 additions and 50 deletions

View File

@ -171,11 +171,6 @@ static inline void profiler_save_profile_to_file(char* aFilename) { }
// Returns a null terminated char* array.
static inline char** profiler_get_features() { return nullptr; }
// Print the current location to the console. This functill will do it best effort
// to show the profiler's combined js/c++ if the profiler is running. Note that
// printing the location require symbolicating which is very slow.
static inline void profiler_print_location() {}
// Discard the profile, throw away the profile and notify 'profiler-locked'.
// This function is to be used when entering private browsing to prevent
// the profiler from collecting sensitive data.

View File

@ -166,16 +166,6 @@ const char** profiler_get_features()
return mozilla_sampler_get_features();
}
static inline
void profiler_print_location()
{
if (!sps_version2()) {
return mozilla_sampler_print_location1();
} else {
return mozilla_sampler_print_location2();
}
}
static inline
void profiler_lock()
{

View File

@ -910,33 +910,3 @@ SyncProfile* TableTicker::GetBacktrace()
return profile;
}
static void print_callback(const ProfileEntry& entry, const char* tagStringData)
{
switch (entry.getTagName()) {
case 's':
case 'c':
printf_stderr(" %s\n", tagStringData);
}
}
void mozilla_sampler_print_location1()
{
if (!stack_key_initialized)
profiler_init(nullptr);
SyncProfile* syncProfile = NewSyncProfile();
if (!syncProfile) {
return;
}
syncProfile->BeginUnwind();
doSampleStackTrace(*syncProfile, nullptr, false);
syncProfile->EndUnwind();
printf_stderr("Backtrace:\n");
syncProfile->IterateTags(print_callback);
delete syncProfile;
}

View File

@ -908,11 +908,6 @@ void mozilla_sampler_frame_number(int frameNumber)
sFrameNumber = frameNumber;
}
void mozilla_sampler_print_location2()
{
// FIXME
}
void mozilla_sampler_lock()
{
profiler_stop();