Chromium Code Reviews| 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 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 469 /** Returns whether two instances are equivalent. */ | 469 /** Returns whether two instances are equivalent. */ |
| 470 virtual bool IsEquivalent(RetainedObjectInfo* other) = 0; | 470 virtual bool IsEquivalent(RetainedObjectInfo* other) = 0; |
| 471 | 471 |
| 472 /** | 472 /** |
| 473 * Returns hash value for the instance. Equivalent instances | 473 * Returns hash value for the instance. Equivalent instances |
| 474 * must have the same hash value. | 474 * must have the same hash value. |
| 475 */ | 475 */ |
| 476 virtual intptr_t GetHash() = 0; | 476 virtual intptr_t GetHash() = 0; |
| 477 | 477 |
| 478 /** | 478 /** |
| 479 * Returns human-readable label. It must be a NUL-terminated UTF-8 | 479 * Returns human-readable label. It must be a null-terminated UTF-8 |
| 480 * encoded string. V8 copies its contents during a call to GetLabel. | 480 * encoded string. V8 copies its contents during a call to GetLabel. |
| 481 */ | 481 */ |
| 482 virtual const char* GetLabel() = 0; | 482 virtual const char* GetLabel() = 0; |
| 483 | 483 |
| 484 /** | 484 /** |
| 485 * Returns human-readable group label. It must be a null-terminated UTF-8 | |
| 486 * encoded string. V8 copies its contents during a call to GetGroupLabel. | |
| 487 * Heap snapshot generator will collect all the group names, create | |
| 488 * top level entries with these names and attach the objects to the | |
|
mnaganov (inactive)
2012/01/27 10:26:38
nit: remove "the" before plurals
| |
| 489 * corresponding top level group objects. There is a default implementation | |
|
mnaganov (inactive)
2012/01/27 10:26:38
Perhaps, rephrase as "the default implementation a
| |
| 490 * which is required because embedders don't have their own implementation yet . | |
|
mnaganov (inactive)
2012/01/27 10:26:38
nit: 80 chars
| |
| 491 */ | |
| 492 virtual const char* GetGroupLabel() { return GetLabel(); } | |
| 493 | |
| 494 /** | |
| 485 * Returns element count in case if a global handle retains | 495 * Returns element count in case if a global handle retains |
| 486 * a subgraph by holding one of its nodes. | 496 * a subgraph by holding one of its nodes. |
| 487 */ | 497 */ |
| 488 virtual intptr_t GetElementCount() { return -1; } | 498 virtual intptr_t GetElementCount() { return -1; } |
| 489 | 499 |
| 490 /** Returns embedder's object size in bytes. */ | 500 /** Returns embedder's object size in bytes. */ |
| 491 virtual intptr_t GetSizeInBytes() { return -1; } | 501 virtual intptr_t GetSizeInBytes() { return -1; } |
| 492 | 502 |
| 493 protected: | 503 protected: |
| 494 RetainedObjectInfo() {} | 504 RetainedObjectInfo() {} |
| 495 virtual ~RetainedObjectInfo() {} | 505 virtual ~RetainedObjectInfo() {} |
| 496 | 506 |
| 497 private: | 507 private: |
| 498 RetainedObjectInfo(const RetainedObjectInfo&); | 508 RetainedObjectInfo(const RetainedObjectInfo&); |
| 499 RetainedObjectInfo& operator=(const RetainedObjectInfo&); | 509 RetainedObjectInfo& operator=(const RetainedObjectInfo&); |
| 500 }; | 510 }; |
| 501 | 511 |
| 502 | 512 |
| 503 } // namespace v8 | 513 } // namespace v8 |
| 504 | 514 |
| 505 | 515 |
| 506 #undef V8EXPORT | 516 #undef V8EXPORT |
| 507 | 517 |
| 508 | 518 |
| 509 #endif // V8_V8_PROFILER_H_ | 519 #endif // V8_V8_PROFILER_H_ |
| OLD | NEW |