| 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 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 const HeapGraphNode* GetToNode() const; | 238 const HeapGraphNode* GetToNode() const; |
| 239 }; | 239 }; |
| 240 | 240 |
| 241 | 241 |
| 242 /** | 242 /** |
| 243 * HeapGraphNode represents a node in a heap graph. | 243 * HeapGraphNode represents a node in a heap graph. |
| 244 */ | 244 */ |
| 245 class V8EXPORT HeapGraphNode { | 245 class V8EXPORT HeapGraphNode { |
| 246 public: | 246 public: |
| 247 enum Type { | 247 enum Type { |
| 248 kInternal = 0, // For compatibility, will be removed. |
| 248 kHidden = 0, // Hidden node, may be filtered when shown to user. | 249 kHidden = 0, // Hidden node, may be filtered when shown to user. |
| 249 kArray = 1, // An array of elements. | 250 kArray = 1, // An array of elements. |
| 250 kString = 2, // A string. | 251 kString = 2, // A string. |
| 251 kObject = 3, // A JS object (except for arrays and strings). | 252 kObject = 3, // A JS object (except for arrays and strings). |
| 252 kCode = 4, // Compiled code. | 253 kCode = 4, // Compiled code. |
| 253 kClosure = 5, // Function closure. | 254 kClosure = 5, // Function closure. |
| 254 kRegExp = 6, // RegExp. | 255 kRegExp = 6, // RegExp. |
| 255 kHeapNumber = 7 // Number stored in the heap. | 256 kHeapNumber = 7 // Number stored in the heap. |
| 256 }; | 257 }; |
| 257 | 258 |
| (...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 | 406 |
| 406 /** Returns a profile by uid. */ | 407 /** Returns a profile by uid. */ |
| 407 static const HeapSnapshot* FindSnapshot(unsigned uid); | 408 static const HeapSnapshot* FindSnapshot(unsigned uid); |
| 408 | 409 |
| 409 /** | 410 /** |
| 410 * Takes a heap snapshot and returns it. Title may be an empty string. | 411 * Takes a heap snapshot and returns it. Title may be an empty string. |
| 411 * See HeapSnapshot::Type for types description. | 412 * See HeapSnapshot::Type for types description. |
| 412 */ | 413 */ |
| 413 static const HeapSnapshot* TakeSnapshot( | 414 static const HeapSnapshot* TakeSnapshot( |
| 414 Handle<String> title, | 415 Handle<String> title, |
| 415 HeapSnapshot::Type type = HeapSnapshot::kFull, | 416 HeapSnapshot::Type type = HeapSnapshot::kFull); |
| 416 ActivityControl* control = NULL); | |
| 417 }; | 417 }; |
| 418 | 418 |
| 419 | 419 |
| 420 } // namespace v8 | 420 } // namespace v8 |
| 421 | 421 |
| 422 | 422 |
| 423 #undef V8EXPORT | 423 #undef V8EXPORT |
| 424 | 424 |
| 425 | 425 |
| 426 #endif // V8_V8_PROFILER_H_ | 426 #endif // V8_V8_PROFILER_H_ |
| OLD | NEW |