Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(239)

Side by Side Diff: include/v8-profiler.h

Issue 93843004: Add methods for finding object by its snapshot id and id for an object (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: One more time Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 375 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 /** Returns a snapshot by index. */ 386 /** Returns a snapshot by index. */
387 const HeapSnapshot* GetHeapSnapshot(int index); 387 const HeapSnapshot* GetHeapSnapshot(int index);
388 388
389 /** 389 /**
390 * Returns SnapshotObjectId for a heap object referenced by |value| if 390 * Returns SnapshotObjectId for a heap object referenced by |value| if
391 * it has been seen by the heap profiler, kUnknownObjectId otherwise. 391 * it has been seen by the heap profiler, kUnknownObjectId otherwise.
392 */ 392 */
393 SnapshotObjectId GetObjectId(Handle<Value> value); 393 SnapshotObjectId GetObjectId(Handle<Value> value);
394 394
395 /** 395 /**
396 * Returns heap object with given SnapshotObjectId if the object is alive,
397 * otherwise empty handle is returned.
398 */
399 Handle<Value> FindObjectById(SnapshotObjectId id);
400
401 /**
402 * Clears internal map from SnapshotObjectId to heap object. The new objects
403 * will not be added into it unless a heap snapshot is taken or heap object
404 * tracking is kicked off.
405 */
406 void ClearObjectIds();
407
408 /**
396 * A constant for invalid SnapshotObjectId. GetSnapshotObjectId will return 409 * A constant for invalid SnapshotObjectId. GetSnapshotObjectId will return
397 * it in case heap profiler cannot find id for the object passed as 410 * it in case heap profiler cannot find id for the object passed as
398 * parameter. HeapSnapshot::GetNodeById will always return NULL for such id. 411 * parameter. HeapSnapshot::GetNodeById will always return NULL for such id.
399 */ 412 */
400 static const SnapshotObjectId kUnknownObjectId = 0; 413 static const SnapshotObjectId kUnknownObjectId = 0;
401 414
402 /** 415 /**
403 * Callback interface for retrieving user friendly names of global objects. 416 * Callback interface for retrieving user friendly names of global objects.
404 */ 417 */
405 class ObjectNameResolver { 418 class ObjectNameResolver {
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after
586 uint32_t index; // Index of the time interval that was changed. 599 uint32_t index; // Index of the time interval that was changed.
587 uint32_t count; // New value of count field for the interval with this index. 600 uint32_t count; // New value of count field for the interval with this index.
588 uint32_t size; // New value of size field for the interval with this index. 601 uint32_t size; // New value of size field for the interval with this index.
589 }; 602 };
590 603
591 604
592 } // namespace v8 605 } // namespace v8
593 606
594 607
595 #endif // V8_V8_PROFILER_H_ 608 #endif // V8_V8_PROFILER_H_
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698