OLD | NEW |
1 // Copyright 2009 the V8 project authors. All rights reserved. | 1 // Copyright 2009 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 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
254 private: | 254 private: |
255 ZoneScope zscope_; | 255 ZoneScope zscope_; |
256 JSObjectsRetainerTree retainers_tree_; | 256 JSObjectsRetainerTree retainers_tree_; |
257 ClustersCoarser coarser_; | 257 ClustersCoarser coarser_; |
258 }; | 258 }; |
259 | 259 |
260 | 260 |
261 class ProducerHeapProfile : public AllStatic { | 261 class ProducerHeapProfile : public AllStatic { |
262 public: | 262 public: |
263 static void Setup(); | 263 static void Setup(); |
264 static void RecordJSObjectAllocation(Object* obj); | 264 static void RecordJSObjectAllocation(Object* obj) { |
| 265 if (FLAG_log_producers) DoRecordJSObjectAllocation(obj); |
| 266 } |
| 267 |
265 private: | 268 private: |
| 269 static void DoRecordJSObjectAllocation(Object* obj); |
266 static bool can_log_; | 270 static bool can_log_; |
267 }; | 271 }; |
268 | 272 |
269 #endif // ENABLE_LOGGING_AND_PROFILING | 273 #endif // ENABLE_LOGGING_AND_PROFILING |
270 | 274 |
271 } } // namespace v8::internal | 275 } } // namespace v8::internal |
272 | 276 |
273 #endif // V8_HEAP_PROFILER_H_ | 277 #endif // V8_HEAP_PROFILER_H_ |
OLD | NEW |