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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
99 | 99 |
100 class SharedFunctionInfoMoveEventRecord : public CodeEventRecord { | 100 class SharedFunctionInfoMoveEventRecord : public CodeEventRecord { |
101 public: | 101 public: |
102 Address from; | 102 Address from; |
103 Address to; | 103 Address to; |
104 | 104 |
105 INLINE(void UpdateCodeMap(CodeMap* code_map)); | 105 INLINE(void UpdateCodeMap(CodeMap* code_map)); |
106 }; | 106 }; |
107 | 107 |
108 | 108 |
109 class TickSampleEventRecord BASE_EMBEDDED { | 109 class TickSampleEventRecord { |
110 public: | 110 public: |
111 TickSampleEventRecord() | 111 TickSampleEventRecord() |
Vitaly Repeshko
2011/06/22 12:58:07
Should it take order as a parameter?
mnaganov (inactive)
2011/06/22 13:33:14
Done.
| |
112 : filler(1) { | 112 : filler(1) { |
113 ASSERT(filler != SamplingCircularQueue::kClear); | 113 ASSERT(filler != SamplingCircularQueue::kClear); |
114 } | 114 } |
115 | 115 |
116 // The first machine word of a TickSampleEventRecord must not ever | 116 // The first machine word of a TickSampleEventRecord must not ever |
117 // become equal to SamplingCircularQueue::kClear. As both order and | 117 // become equal to SamplingCircularQueue::kClear. As both order and |
118 // TickSample's first field are not reliable in this sense (order | 118 // TickSample's first field are not reliable in this sense (order |
119 // can overflow, TickSample can have all fields reset), we are | 119 // can overflow, TickSample can have all fields reset), we are |
120 // forced to use an artificial filler field. | 120 // forced to use an artificial filler field. |
121 int filler; | 121 int filler; |
122 unsigned order; | 122 unsigned order; |
123 TickSample sample; | 123 TickSample sample; |
124 | 124 |
125 static TickSampleEventRecord* cast(void* value) { | 125 static TickSampleEventRecord* cast(void* value) { |
126 return reinterpret_cast<TickSampleEventRecord*>(value); | 126 return reinterpret_cast<TickSampleEventRecord*>(value); |
127 } | 127 } |
128 | |
129 INLINE(static TickSampleEventRecord* init(void* value)); | |
130 }; | 128 }; |
131 | 129 |
132 | 130 |
133 // This class implements both the profile events processor thread and | 131 // This class implements both the profile events processor thread and |
134 // methods called by event producers: VM and stack sampler threads. | 132 // methods called by event producers: VM and stack sampler threads. |
135 class ProfilerEventsProcessor : public Thread { | 133 class ProfilerEventsProcessor : public Thread { |
136 public: | 134 public: |
137 explicit ProfilerEventsProcessor(ProfileGenerator* generator); | 135 explicit ProfilerEventsProcessor(ProfileGenerator* generator); |
138 virtual ~ProfilerEventsProcessor() {} | 136 virtual ~ProfilerEventsProcessor() {} |
139 | 137 |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
292 #endif // ENABLE_LOGGING_AND_PROFILING | 290 #endif // ENABLE_LOGGING_AND_PROFILING |
293 | 291 |
294 private: | 292 private: |
295 DISALLOW_COPY_AND_ASSIGN(CpuProfiler); | 293 DISALLOW_COPY_AND_ASSIGN(CpuProfiler); |
296 }; | 294 }; |
297 | 295 |
298 } } // namespace v8::internal | 296 } } // namespace v8::internal |
299 | 297 |
300 | 298 |
301 #endif // V8_CPU_PROFILER_H_ | 299 #endif // V8_CPU_PROFILER_H_ |
OLD | NEW |