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

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

Issue 5154007: New heap profiler: implement fast retaining sizes approximation. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 10 years, 1 month 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') | src/profile-generator-inl.h » ('J')
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 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 275
276 /** 276 /**
277 * Returns the number of instances. Only applicable to aggregated 277 * Returns the number of instances. Only applicable to aggregated
278 * heap snapshots. 278 * heap snapshots.
279 */ 279 */
280 int GetInstancesCount() const; 280 int GetInstancesCount() const;
281 281
282 /** Returns node's own size, in bytes. */ 282 /** Returns node's own size, in bytes. */
283 int GetSelfSize() const; 283 int GetSelfSize() const;
284 284
285 /** Returns node's network (self + reachable nodes) size, in bytes. */
286 int GetReachableSize() const;
287
288 /** 285 /**
289 * Returns node's retained size, in bytes. That is, self + sizes of 286 * Returns node's retained size, in bytes. That is, self + sizes of
290 * the objects that are reachable only from this object. In other 287 * the objects that are reachable only from this object. In other
291 * words, the size of memory that will be reclaimed having this node 288 * words, the size of memory that will be reclaimed having this node
292 * collected. 289 * collected.
290 *
291 * Exact retained size calculation has O(N) (number of nodes)
292 * computational complexity, while approximate has O(1). It is
293 * assumed that initially heap profiling tools provide approximate
294 * sizes for all nodes, and then exact sizes are calculated for the
295 * most 'interesting' nodes.
293 */ 296 */
294 int GetRetainedSize() const; 297 int GetRetainedSize(bool exact) const;
295 298
296 /** Returns child nodes count of the node. */ 299 /** Returns child nodes count of the node. */
297 int GetChildrenCount() const; 300 int GetChildrenCount() const;
298 301
299 /** Retrieves a child by index. */ 302 /** Retrieves a child by index. */
300 const HeapGraphEdge* GetChild(int index) const; 303 const HeapGraphEdge* GetChild(int index) const;
301 304
302 /** Returns retainer nodes count of the node. */ 305 /** Returns retainer nodes count of the node. */
303 int GetRetainersCount() const; 306 int GetRetainersCount() const;
304 307
305 /** Returns a retainer by index. */ 308 /** Returns a retainer by index. */
306 const HeapGraphEdge* GetRetainer(int index) const; 309 const HeapGraphEdge* GetRetainer(int index) const;
307 310
308 /** Returns the number of simple retaining paths from the root to the node. */ 311 /** Returns the number of simple retaining paths from the root to the node. */
309 int GetRetainingPathsCount() const; 312 int GetRetainingPathsCount() const;
310 313
311 /** Returns a retaining path by index. */ 314 /** Returns a retaining path by index. */
312 const HeapGraphPath* GetRetainingPath(int index) const; 315 const HeapGraphPath* GetRetainingPath(int index) const;
316
317 /**
318 * Returns a dominator node. This is the node that participates in every
Søren Thygesen Gjesse 2010/11/22 09:49:48 is the -> is a?
mnaganov (inactive) 2010/11/22 16:43:56 Done.
319 * path from the snapshot root to the current node.
320 */
321 const HeapGraphNode* GetDominatorNode() const;
313 }; 322 };
314 323
315 324
316 class V8EXPORT HeapSnapshotsDiff { 325 class V8EXPORT HeapSnapshotsDiff {
317 public: 326 public:
318 /** Returns the root node for added nodes. */ 327 /** Returns the root node for added nodes. */
319 const HeapGraphNode* GetAdditionsRoot() const; 328 const HeapGraphNode* GetAdditionsRoot() const;
320 329
321 /** Returns the root node for deleted nodes. */ 330 /** Returns the root node for deleted nodes. */
322 const HeapGraphNode* GetDeletionsRoot() const; 331 const HeapGraphNode* GetDeletionsRoot() const;
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
405 }; 414 };
406 415
407 416
408 } // namespace v8 417 } // namespace v8
409 418
410 419
411 #undef V8EXPORT 420 #undef V8EXPORT
412 421
413 422
414 #endif // V8_V8_PROFILER_H_ 423 #endif // V8_V8_PROFILER_H_
OLDNEW
« no previous file with comments | « no previous file | src/api.cc » ('j') | src/profile-generator-inl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698