diff options
Diffstat (limited to 'base/profiler')
-rw-r--r-- | base/profiler/module_cache_win.cc | 1 | ||||
-rw-r--r-- | base/profiler/native_unwinder_android.cc | 14 | ||||
-rw-r--r-- | base/profiler/stack_sampling_profiler_unittest.cc | 3 | ||||
-rw-r--r-- | base/profiler/suspendable_thread_delegate_win.cc | 3 | ||||
-rw-r--r-- | base/profiler/suspendable_thread_delegate_win.h | 1 |
5 files changed, 14 insertions, 8 deletions
diff --git a/base/profiler/module_cache_win.cc b/base/profiler/module_cache_win.cc index 73a7d2e1b..b8164b933 100644 --- a/base/profiler/module_cache_win.cc +++ b/base/profiler/module_cache_win.cc @@ -5,6 +5,7 @@ #include "base/profiler/module_cache.h" #include <objbase.h> + #include <psapi.h> #include <string> diff --git a/base/profiler/native_unwinder_android.cc b/base/profiler/native_unwinder_android.cc index ceda24b03..6ee694a0d 100644 --- a/base/profiler/native_unwinder_android.cc +++ b/base/profiler/native_unwinder_android.cc @@ -9,12 +9,8 @@ #include <string> #include <vector> -#include "third_party/libunwindstack/src/libunwindstack/include/unwindstack/Elf.h" -#include "third_party/libunwindstack/src/libunwindstack/include/unwindstack/Maps.h" -#include "third_party/libunwindstack/src/libunwindstack/include/unwindstack/Memory.h" -#include "third_party/libunwindstack/src/libunwindstack/include/unwindstack/Regs.h" - #include "base/memory/ptr_util.h" +#include "base/metrics/histogram_macros.h" #include "base/metrics/metrics_hashes.h" #include "base/notreached.h" #include "base/profiler/module_cache.h" @@ -22,6 +18,10 @@ #include "base/profiler/native_unwinder_android_memory_regions_map_impl.h" #include "base/profiler/profile_builder.h" #include "build/build_config.h" +#include "third_party/libunwindstack/src/libunwindstack/include/unwindstack/Elf.h" +#include "third_party/libunwindstack/src/libunwindstack/include/unwindstack/Maps.h" +#include "third_party/libunwindstack/src/libunwindstack/include/unwindstack/Memory.h" +#include "third_party/libunwindstack/src/libunwindstack/include/unwindstack/Regs.h" #if defined(ARCH_CPU_ARM_FAMILY) && defined(ARCH_CPU_32_BITS) #include "third_party/libunwindstack/src/libunwindstack/include/unwindstack/MachineArm.h" @@ -301,7 +301,9 @@ void NativeUnwinderAndroid::EmitDexFrame(uintptr_t dex_pc, stack->emplace_back( HashMetricNameAs32Bits(static_cast<const std::string&>(function_name)), module); - + UMA_HISTOGRAM_COUNTS_1000( + "UMA.StackProfiler.JavaNameLength", + static_cast<const std::string&>(function_name).size()); } else { stack->emplace_back(dex_pc, module); } diff --git a/base/profiler/stack_sampling_profiler_unittest.cc b/base/profiler/stack_sampling_profiler_unittest.cc index 4f9ebe944..e2a323528 100644 --- a/base/profiler/stack_sampling_profiler_unittest.cc +++ b/base/profiler/stack_sampling_profiler_unittest.cc @@ -39,9 +39,10 @@ #include "testing/gtest/include/gtest/gtest.h" #if BUILDFLAG(IS_WIN) +#include <windows.h> + #include <intrin.h> #include <malloc.h> -#include <windows.h> #else #include <alloca.h> #endif diff --git a/base/profiler/suspendable_thread_delegate_win.cc b/base/profiler/suspendable_thread_delegate_win.cc index f691819f6..f4363b089 100644 --- a/base/profiler/suspendable_thread_delegate_win.cc +++ b/base/profiler/suspendable_thread_delegate_win.cc @@ -5,6 +5,7 @@ #include "base/profiler/suspendable_thread_delegate_win.h" #include <windows.h> + #include <winternl.h> #include <vector> @@ -173,7 +174,7 @@ SuspendableThreadDelegateWin::ScopedSuspendThread::~ScopedSuspendThread() { ScopedDisablePriorityBoost disable_priority_boost(thread_handle_); bool resume_thread_succeeded = ::ResumeThread(thread_handle_) != static_cast<DWORD>(-1); - CHECK(resume_thread_succeeded) << "ResumeThread failed: " << GetLastError(); + PCHECK(resume_thread_succeeded) << "ResumeThread failed"; } bool SuspendableThreadDelegateWin::ScopedSuspendThread::WasSuccessful() const { diff --git a/base/profiler/suspendable_thread_delegate_win.h b/base/profiler/suspendable_thread_delegate_win.h index b50baebda..bca0426bb 100644 --- a/base/profiler/suspendable_thread_delegate_win.h +++ b/base/profiler/suspendable_thread_delegate_win.h @@ -6,6 +6,7 @@ #define BASE_PROFILER_SUSPENDABLE_THREAD_DELEGATE_WIN_H_ #include <windows.h> + #include <memory> #include <vector> |