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

Side by Side 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: 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 unified diff | Download patch | Annotate | Revision Log
« src/allocation.cc ('K') | « src/cpu-profiler.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
149 // Process remaining tick events. 149 // Process remaining tick events.
150 do { 150 do {
151 SampleProcessingResult result; 151 SampleProcessingResult result;
152 do { 152 do {
153 result = ProcessOneSample(); 153 result = ProcessOneSample();
154 } while (result == OneSampleProcessed); 154 } while (result == OneSampleProcessed);
155 } while (ProcessCodeEvent()); 155 } while (ProcessCodeEvent());
156 } 156 }
157 157
158 158
159 void* ProfilerEventsProcessor::operator new(size_t size) {
160 return AlignedMalloc(size, V8_ALIGNOF(ProfilerEventsProcessor));
161 }
162
163
164 void ProfilerEventsProcessor::operator delete(void* ptr) {
165 AlignedFree(ptr);
166 }
167
168
159 int CpuProfiler::GetProfilesCount() { 169 int CpuProfiler::GetProfilesCount() {
160 // The count of profiles doesn't depend on a security token. 170 // The count of profiles doesn't depend on a security token.
161 return profiles_->profiles()->length(); 171 return profiles_->profiles()->length();
162 } 172 }
163 173
164 174
165 CpuProfile* CpuProfiler::GetProfile(int index) { 175 CpuProfile* CpuProfiler::GetProfile(int index) {
166 return profiles_->profiles()->at(index); 176 return profiles_->profiles()->at(index);
167 } 177 }
168 178
(...skipping 346 matching lines...) Expand 10 before | Expand all | Expand 10 after
515 ReportBuiltinEventRecord* rec = &evt_rec.ReportBuiltinEventRecord_; 525 ReportBuiltinEventRecord* rec = &evt_rec.ReportBuiltinEventRecord_;
516 Builtins::Name id = static_cast<Builtins::Name>(i); 526 Builtins::Name id = static_cast<Builtins::Name>(i);
517 rec->start = builtins->builtin(id)->address(); 527 rec->start = builtins->builtin(id)->address();
518 rec->builtin_id = id; 528 rec->builtin_id = id;
519 processor_->Enqueue(evt_rec); 529 processor_->Enqueue(evt_rec);
520 } 530 }
521 } 531 }
522 532
523 533
524 } } // namespace v8::internal 534 } } // namespace v8::internal
OLDNEW
« src/allocation.cc ('K') | « src/cpu-profiler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698