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 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 delete token_enumerator_; | 416 delete token_enumerator_; |
417 delete profiles_; | 417 delete profiles_; |
418 } | 418 } |
419 | 419 |
420 | 420 |
421 void CpuProfiler::ResetProfiles() { | 421 void CpuProfiler::ResetProfiles() { |
422 delete profiles_; | 422 delete profiles_; |
423 profiles_ = new CpuProfilesCollection(); | 423 profiles_ = new CpuProfilesCollection(); |
424 } | 424 } |
425 | 425 |
| 426 |
426 void CpuProfiler::StartProfiling(const char* title, bool record_samples) { | 427 void CpuProfiler::StartProfiling(const char* title, bool record_samples) { |
427 if (profiles_->StartProfiling(title, next_profile_uid_++, record_samples)) { | 428 if (profiles_->StartProfiling(title, next_profile_uid_++, record_samples)) { |
428 StartProcessorIfNotStarted(); | 429 StartProcessorIfNotStarted(); |
429 } | 430 } |
430 processor_->AddCurrentStack(isolate_); | 431 processor_->AddCurrentStack(isolate_); |
431 } | 432 } |
432 | 433 |
433 | 434 |
434 void CpuProfiler::StartProfiling(String* title, bool record_samples) { | 435 void CpuProfiler::StartProfiling(String* title, bool record_samples) { |
435 StartProfiling(profiles_->GetName(title), record_samples); | 436 StartProfiling(profiles_->GetName(title), record_samples); |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
522 ReportBuiltinEventRecord* rec = &evt_rec.ReportBuiltinEventRecord_; | 523 ReportBuiltinEventRecord* rec = &evt_rec.ReportBuiltinEventRecord_; |
523 Builtins::Name id = static_cast<Builtins::Name>(i); | 524 Builtins::Name id = static_cast<Builtins::Name>(i); |
524 rec->start = builtins->builtin(id)->address(); | 525 rec->start = builtins->builtin(id)->address(); |
525 rec->builtin_id = id; | 526 rec->builtin_id = id; |
526 processor_->Enqueue(evt_rec); | 527 processor_->Enqueue(evt_rec); |
527 } | 528 } |
528 } | 529 } |
529 | 530 |
530 | 531 |
531 } } // namespace v8::internal | 532 } } // namespace v8::internal |
OLD | NEW |