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

Side by Side Diff: src/profile-generator-inl.h

Issue 1514006: C++ profiles processor: put under #ifdef and fix issues. (Closed)
Patch Set: Created 10 years, 8 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
OLDNEW
1 // Copyright 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 15 matching lines...) Expand all
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 27
28 #ifndef V8_PROFILE_GENERATOR_INL_H_ 28 #ifndef V8_PROFILE_GENERATOR_INL_H_
29 #define V8_PROFILE_GENERATOR_INL_H_ 29 #define V8_PROFILE_GENERATOR_INL_H_
30 30
31 #include "profile-generator.h" 31 #include "profile-generator.h"
32 32
33 namespace v8 { 33 namespace v8 {
34 namespace internal { 34 namespace internal {
35 35
36 #ifdef ENABLE_CPP_PROFILES_PROCESSOR
36 37
37 CodeEntry::CodeEntry(Logger::LogEventsAndTags tag, 38 CodeEntry::CodeEntry(Logger::LogEventsAndTags tag,
38 const char* name, 39 const char* name,
39 const char* resource_name, 40 const char* resource_name,
40 int line_number) 41 int line_number)
41 : tag_(tag), 42 : tag_(tag),
42 name_(name), 43 name_(name),
43 resource_name_(resource_name), 44 resource_name_(resource_name),
44 line_number_(line_number) { 45 line_number_(line_number) {
45 } 46 }
(...skipping 23 matching lines...) Expand all
69 70
70 void CodeMap::MoveCode(Address from, Address to) { 71 void CodeMap::MoveCode(Address from, Address to) {
71 tree_.Move(from, to); 72 tree_.Move(from, to);
72 } 73 }
73 74
74 void CodeMap::DeleteCode(Address addr) { 75 void CodeMap::DeleteCode(Address addr) {
75 tree_.Remove(addr); 76 tree_.Remove(addr);
76 } 77 }
77 78
78 79
80 bool CpuProfilesCollection::is_last_profile() {
81 // Called from VM thread, and only it can mutate the list,
82 // so no locking is needed here.
83 return current_profiles_.length() == 1;
84 }
85
86 #endif // ENABLE_CPP_PROFILES_PROCESSOR
87
79 } } // namespace v8::internal 88 } } // namespace v8::internal
80 89
81 #endif // V8_PROFILE_GENERATOR_INL_H_ 90 #endif // V8_PROFILE_GENERATOR_INL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698