| 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 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 /** Returns the number of snapshots taken. */ | 406 /** Returns the number of snapshots taken. */ |
| 407 static int GetSnapshotsCount(); | 407 static int GetSnapshotsCount(); |
| 408 | 408 |
| 409 /** Returns a snapshot by index. */ | 409 /** Returns a snapshot by index. */ |
| 410 static const HeapSnapshot* GetSnapshot(int index); | 410 static const HeapSnapshot* GetSnapshot(int index); |
| 411 | 411 |
| 412 /** Returns a profile by uid. */ | 412 /** Returns a profile by uid. */ |
| 413 static const HeapSnapshot* FindSnapshot(unsigned uid); | 413 static const HeapSnapshot* FindSnapshot(unsigned uid); |
| 414 | 414 |
| 415 /** | 415 /** |
| 416 * Returns SnapshotObjectId for a heap object referenced by |value| if |
| 417 * it has been seen by the heap profiler, kUnknownObjectId otherwise. |
| 418 */ |
| 419 static SnapshotObjectId GetSnapshotObjectId(Handle<Value> value); |
| 420 |
| 421 /** |
| 422 * A constant for invalid SnapshotObjectId. GetSnapshotObjectId will return |
| 423 * it in case heap profiler cannot find id for the object passed as |
| 424 * parameter. HeapSnapshot::GetNodeById will always return NULL for such id. |
| 425 */ |
| 426 static const SnapshotObjectId kUnknownObjectId = 0; |
| 427 |
| 428 /** |
| 416 * Takes a heap snapshot and returns it. Title may be an empty string. | 429 * Takes a heap snapshot and returns it. Title may be an empty string. |
| 417 * See HeapSnapshot::Type for types description. | 430 * See HeapSnapshot::Type for types description. |
| 418 */ | 431 */ |
| 419 static const HeapSnapshot* TakeSnapshot( | 432 static const HeapSnapshot* TakeSnapshot( |
| 420 Handle<String> title, | 433 Handle<String> title, |
| 421 HeapSnapshot::Type type = HeapSnapshot::kFull, | 434 HeapSnapshot::Type type = HeapSnapshot::kFull, |
| 422 ActivityControl* control = NULL); | 435 ActivityControl* control = NULL); |
| 423 | 436 |
| 424 /** | 437 /** |
| 425 * Starts tracking of heap objects population statistics. After calling | 438 * Starts tracking of heap objects population statistics. After calling |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 546 }; | 559 }; |
| 547 | 560 |
| 548 | 561 |
| 549 } // namespace v8 | 562 } // namespace v8 |
| 550 | 563 |
| 551 | 564 |
| 552 #undef V8EXPORT | 565 #undef V8EXPORT |
| 553 | 566 |
| 554 | 567 |
| 555 #endif // V8_V8_PROFILER_H_ | 568 #endif // V8_V8_PROFILER_H_ |
| OLD | NEW |