OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |