Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Side by Side Diff: base/profiler/stack_sampling_profiler.cc

Issue 1325653003: Type change in StackSamplingProfiler from void* to uintptr_t. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@UMA2_refactor
Patch Set: Rebase and CL now only includes type changes. Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/profiler/stack_sampling_profiler.h" 5 #include "base/profiler/stack_sampling_profiler.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/bind_helpers.h" 10 #include "base/bind_helpers.h"
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 const StackSamplingProfiler::CallStackProfiles& profiles) { 76 const StackSamplingProfiler::CallStackProfiles& profiles) {
77 callback.Run(profiles); 77 callback.Run(profiles);
78 // Delete the instance on the original calling thread. 78 // Delete the instance on the original calling thread.
79 task_runner->DeleteSoon(FROM_HERE, object_to_be_deleted.release()); 79 task_runner->DeleteSoon(FROM_HERE, object_to_be_deleted.release());
80 } 80 }
81 81
82 } // namespace 82 } // namespace
83 83
84 // StackSamplingProfiler::Module ---------------------------------------------- 84 // StackSamplingProfiler::Module ----------------------------------------------
85 85
86 StackSamplingProfiler::Module::Module() : base_address(nullptr) {} 86 StackSamplingProfiler::Module::Module() : base_address(0u) {}
87 StackSamplingProfiler::Module::Module(const void* base_address, 87 StackSamplingProfiler::Module::Module(uintptr_t base_address,
88 const std::string& id, 88 const std::string& id,
89 const FilePath& filename) 89 const FilePath& filename)
90 : base_address(base_address), id(id), filename(filename) {} 90 : base_address(base_address), id(id), filename(filename) {}
91 91
92 StackSamplingProfiler::Module::~Module() {} 92 StackSamplingProfiler::Module::~Module() {}
93 93
94 // StackSamplingProfiler::Frame ----------------------------------------------- 94 // StackSamplingProfiler::Frame -----------------------------------------------
95 95
96 StackSamplingProfiler::Frame::Frame(const void* instruction_pointer, 96 StackSamplingProfiler::Frame::Frame(uintptr_t instruction_pointer,
97 size_t module_index) 97 size_t module_index)
98 : instruction_pointer(instruction_pointer), 98 : instruction_pointer(instruction_pointer), module_index(module_index) {}
99 module_index(module_index) {}
100 99
101 StackSamplingProfiler::Frame::~Frame() {} 100 StackSamplingProfiler::Frame::~Frame() {}
102 101
102 StackSamplingProfiler::Frame::Frame() {}
103
103 // StackSamplingProfiler::CallStackProfile ------------------------------------ 104 // StackSamplingProfiler::CallStackProfile ------------------------------------
104 105
105 StackSamplingProfiler::CallStackProfile::CallStackProfile() {} 106 StackSamplingProfiler::CallStackProfile::CallStackProfile() {}
106 107
107 StackSamplingProfiler::CallStackProfile::~CallStackProfile() {} 108 StackSamplingProfiler::CallStackProfile::~CallStackProfile() {}
108 109
109 // StackSamplingProfiler::SamplingThread -------------------------------------- 110 // StackSamplingProfiler::SamplingThread --------------------------------------
110 111
111 StackSamplingProfiler::SamplingThread::SamplingThread( 112 StackSamplingProfiler::SamplingThread::SamplingThread(
112 scoped_ptr<NativeStackSampler> native_sampler, 113 scoped_ptr<NativeStackSampler> native_sampler,
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 } 267 }
267 268
268 bool operator<(const StackSamplingProfiler::Frame &a, 269 bool operator<(const StackSamplingProfiler::Frame &a,
269 const StackSamplingProfiler::Frame &b) { 270 const StackSamplingProfiler::Frame &b) {
270 return (a.module_index < b.module_index) || 271 return (a.module_index < b.module_index) ||
271 (a.module_index == b.module_index && 272 (a.module_index == b.module_index &&
272 a.instruction_pointer < b.instruction_pointer); 273 a.instruction_pointer < b.instruction_pointer);
273 } 274 }
274 275
275 } // namespace base 276 } // namespace base
OLDNEW
« no previous file with comments | « base/profiler/stack_sampling_profiler.h ('k') | base/profiler/stack_sampling_profiler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698