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

Side by Side Diff: src/profile-generator.cc

Issue 18509003: Keep two empty lines between declarations for cpp files (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 7 years, 5 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
« no previous file with comments | « src/preparser.cc ('k') | src/runtime.cc » ('j') | 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 379 matching lines...) Expand 10 before | Expand all | Expand 10 after
390 return parent_token == TokenEnumerator::kNoSecurityToken 390 return parent_token == TokenEnumerator::kNoSecurityToken
391 || parent_token == security_token_id_; 391 || parent_token == security_token_id_;
392 } 392 }
393 return false; 393 return false;
394 } 394 }
395 395
396 List<NodesPair> stack_; 396 List<NodesPair> stack_;
397 int security_token_id_; 397 int security_token_id_;
398 }; 398 };
399 399
400
400 void ProfileTree::FilteredClone(ProfileTree* src, int security_token_id) { 401 void ProfileTree::FilteredClone(ProfileTree* src, int security_token_id) {
401 ms_to_ticks_scale_ = src->ms_to_ticks_scale_; 402 ms_to_ticks_scale_ = src->ms_to_ticks_scale_;
402 FilteredCloneCallback cb(root_, security_token_id); 403 FilteredCloneCallback cb(root_, security_token_id);
403 src->TraverseDepthFirst(&cb); 404 src->TraverseDepthFirst(&cb);
404 CalculateTotalTicks(); 405 CalculateTotalTicks();
405 } 406 }
406 407
407 408
408 void ProfileTree::SetTickRatePerMs(double ticks_per_ms) { 409 void ProfileTree::SetTickRatePerMs(double ticks_per_ms) {
409 ms_to_ticks_scale_ = ticks_per_ms > 0 ? 1.0 / ticks_per_ms : 1.0; 410 ms_to_ticks_scale_ = ticks_per_ms > 0 ? 1.0 / ticks_per_ms : 1.0;
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
605 current_profiles_semaphore_(OS::CreateSemaphore(1)) { 606 current_profiles_semaphore_(OS::CreateSemaphore(1)) {
606 // Create list of unabridged profiles. 607 // Create list of unabridged profiles.
607 profiles_by_token_.Add(new List<CpuProfile*>()); 608 profiles_by_token_.Add(new List<CpuProfile*>());
608 } 609 }
609 610
610 611
611 static void DeleteCodeEntry(CodeEntry** entry_ptr) { 612 static void DeleteCodeEntry(CodeEntry** entry_ptr) {
612 delete *entry_ptr; 613 delete *entry_ptr;
613 } 614 }
614 615
616
615 static void DeleteCpuProfile(CpuProfile** profile_ptr) { 617 static void DeleteCpuProfile(CpuProfile** profile_ptr) {
616 delete *profile_ptr; 618 delete *profile_ptr;
617 } 619 }
618 620
621
619 static void DeleteProfilesList(List<CpuProfile*>** list_ptr) { 622 static void DeleteProfilesList(List<CpuProfile*>** list_ptr) {
620 if (*list_ptr != NULL) { 623 if (*list_ptr != NULL) {
621 (*list_ptr)->Iterate(DeleteCpuProfile); 624 (*list_ptr)->Iterate(DeleteCpuProfile);
622 delete *list_ptr; 625 delete *list_ptr;
623 } 626 }
624 } 627 }
625 628
629
626 CpuProfilesCollection::~CpuProfilesCollection() { 630 CpuProfilesCollection::~CpuProfilesCollection() {
627 delete current_profiles_semaphore_; 631 delete current_profiles_semaphore_;
628 current_profiles_.Iterate(DeleteCpuProfile); 632 current_profiles_.Iterate(DeleteCpuProfile);
629 detached_profiles_.Iterate(DeleteCpuProfile); 633 detached_profiles_.Iterate(DeleteCpuProfile);
630 profiles_by_token_.Iterate(DeleteProfilesList); 634 profiles_by_token_.Iterate(DeleteProfilesList);
631 code_entries_.Iterate(DeleteCodeEntry); 635 code_entries_.Iterate(DeleteCodeEntry);
632 } 636 }
633 637
634 638
635 bool CpuProfilesCollection::StartProfiling(const char* title, unsigned uid, 639 bool CpuProfilesCollection::StartProfiling(const char* title, unsigned uid,
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
941 if (no_symbolized_entries) { 945 if (no_symbolized_entries) {
942 *entry++ = EntryForVMState(sample.state); 946 *entry++ = EntryForVMState(sample.state);
943 } 947 }
944 } 948 }
945 949
946 profiles_->AddPathToCurrentProfiles(entries); 950 profiles_->AddPathToCurrentProfiles(entries);
947 } 951 }
948 952
949 953
950 } } // namespace v8::internal 954 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/preparser.cc ('k') | src/runtime.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698