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

Unified Diff: src/cpu-profiler.cc

Issue 131393002: Fixed alignment issues of ProfilerEventsProcessor. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Simplified. Created 6 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/cpu-profiler.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/cpu-profiler.cc
diff --git a/src/cpu-profiler.cc b/src/cpu-profiler.cc
index c36850c1e0c436783dd5dfb5058673a59e4a7d99..41f3e986444b9d2371ef4a2a707ae35778084f6e 100644
--- a/src/cpu-profiler.cc
+++ b/src/cpu-profiler.cc
@@ -156,6 +156,16 @@ void ProfilerEventsProcessor::Run() {
}
+void* ProfilerEventsProcessor::operator new(size_t size) {
+ return AlignedAlloc(size, V8_ALIGNOF(ProfilerEventsProcessor));
+}
+
+
+void ProfilerEventsProcessor::operator delete(void* ptr) {
+ AlignedFree(ptr);
+}
+
+
int CpuProfiler::GetProfilesCount() {
// The count of profiles doesn't depend on a security token.
return profiles_->profiles()->length();
@@ -439,18 +449,8 @@ void CpuProfiler::StartProcessorIfNotStarted() {
logger->is_logging_ = false;
generator_ = new ProfileGenerator(profiles_);
Sampler* sampler = logger->sampler();
-#if V8_CC_MSVC && (_MSC_VER >= 1800)
- // VS2013 reports "warning C4316: 'v8::internal::ProfilerEventsProcessor'
- // : object allocated on the heap may not be aligned 64". We need to
- // figure out if this is a legitimate warning or a compiler bug.
- #pragma warning(push)
- #pragma warning(disable:4316)
-#endif
processor_ = new ProfilerEventsProcessor(
generator_, sampler, sampling_interval_);
-#if V8_CC_MSVC && (_MSC_VER >= 1800)
- #pragma warning(pop)
-#endif
is_profiling_ = true;
// Enumerate stuff we already have in the heap.
ASSERT(isolate_->heap()->HasBeenSetUp());
« no previous file with comments | « src/cpu-profiler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698