| 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 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 * Prepare a serialized representation of the snapshot. The result | 361 * Prepare a serialized representation of the snapshot. The result |
| 362 * is written into the stream provided in chunks of specified size. | 362 * is written into the stream provided in chunks of specified size. |
| 363 * The total length of the serialized snapshot is unknown in | 363 * The total length of the serialized snapshot is unknown in |
| 364 * advance, it can be roughly equal to JS heap size (that means, | 364 * advance, it can be roughly equal to JS heap size (that means, |
| 365 * it can be really big - tens of megabytes). | 365 * it can be really big - tens of megabytes). |
| 366 * | 366 * |
| 367 * For the JSON format, heap contents are represented as an object | 367 * For the JSON format, heap contents are represented as an object |
| 368 * with the following structure: | 368 * with the following structure: |
| 369 * | 369 * |
| 370 * { | 370 * { |
| 371 * snapshot: {title: "...", uid: nnn}, | 371 * snapshot: { |
| 372 * nodes: [ | 372 * title: "...", |
| 373 * meta-info (JSON string), | 373 * uid: nnn, |
| 374 * nodes themselves | 374 * meta: { meta-info }, |
| 375 * ], | 375 * node_count: nnn, |
| 376 * strings: [strings] | 376 * edge_count: nnn |
| 377 * }, |
| 378 * nodes: [nodes array], |
| 379 * edges: [edges array], |
| 380 * strings: [strings array] |
| 377 * } | 381 * } |
| 378 * | 382 * |
| 379 * Outgoing node links are stored after each node. Nodes reference strings | 383 * Nodes reference strings, other nodes, and edges by their indexes |
| 380 * and other nodes by their indexes in corresponding arrays. | 384 * in corresponding arrays. |
| 381 */ | 385 */ |
| 382 void Serialize(OutputStream* stream, SerializationFormat format) const; | 386 void Serialize(OutputStream* stream, SerializationFormat format) const; |
| 383 }; | 387 }; |
| 384 | 388 |
| 385 | 389 |
| 386 class RetainedObjectInfo; | 390 class RetainedObjectInfo; |
| 387 | 391 |
| 388 /** | 392 /** |
| 389 * Interface for controlling heap profiling. | 393 * Interface for controlling heap profiling. |
| 390 */ | 394 */ |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 }; | 518 }; |
| 515 | 519 |
| 516 | 520 |
| 517 } // namespace v8 | 521 } // namespace v8 |
| 518 | 522 |
| 519 | 523 |
| 520 #undef V8EXPORT | 524 #undef V8EXPORT |
| 521 | 525 |
| 522 | 526 |
| 523 #endif // V8_V8_PROFILER_H_ | 527 #endif // V8_V8_PROFILER_H_ |
| OLD | NEW |