OLD | NEW |
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 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 class TickSampleEventRecord { | 104 class TickSampleEventRecord { |
105 public: | 105 public: |
106 // In memory, the first machine word of a TickSampleEventRecord will be the | 106 // In memory, the first machine word of a TickSampleEventRecord will be the |
107 // first entry of TickSample, that is -- a program counter field. | 107 // first entry of TickSample, that is -- a program counter field. |
108 // TickSample is put first, because 'order' can become equal to | 108 // TickSample is put first, because 'order' can become equal to |
109 // SamplingCircularQueue::kClear, while program counter can't. | 109 // SamplingCircularQueue::kClear, while program counter can't. |
110 TickSample sample; | 110 TickSample sample; |
111 unsigned order; | 111 unsigned order; |
112 | 112 |
113 #if defined(__GNUC__) && (__GNUC__ < 4) | 113 #if defined(__GNUC__) && (__GNUC__ < 4) |
114 // Added to avoid 'all member functions in class are private' error. | 114 // Added to avoid 'all member functions in class are private' warning. |
115 INLINE(unsigned get_order() const) { return order; } | 115 INLINE(unsigned get_order() const) { return order; } |
| 116 // Added to avoid 'class only defines private constructors and |
| 117 // has no friends' warning. |
| 118 friend class TickSampleEventRecordFriend; |
116 #endif | 119 #endif |
117 private: | 120 private: |
118 // Disable instantiation. | 121 // Disable instantiation. |
119 TickSampleEventRecord(); | 122 TickSampleEventRecord(); |
120 | 123 |
121 DISALLOW_COPY_AND_ASSIGN(TickSampleEventRecord); | 124 DISALLOW_COPY_AND_ASSIGN(TickSampleEventRecord); |
122 }; | 125 }; |
123 | 126 |
124 | 127 |
125 // This class implements both the profile events processor thread and | 128 // This class implements both the profile events processor thread and |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 bool running_; | 178 bool running_; |
176 CircularQueue<CodeEventsContainer> events_buffer_; | 179 CircularQueue<CodeEventsContainer> events_buffer_; |
177 SamplingCircularQueue ticks_buffer_; | 180 SamplingCircularQueue ticks_buffer_; |
178 unsigned enqueue_order_; | 181 unsigned enqueue_order_; |
179 }; | 182 }; |
180 | 183 |
181 | 184 |
182 } } // namespace v8::internal | 185 } } // namespace v8::internal |
183 | 186 |
184 #endif // V8_CPU_PROFILER_H_ | 187 #endif // V8_CPU_PROFILER_H_ |
OLD | NEW |