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

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

Issue 6770009: Remove snapshots-related code that is implemented in DevTools heap profiler. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 9 months 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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 Handle<Value> GetName() const; 233 Handle<Value> GetName() const;
234 234
235 /** Returns origin node. */ 235 /** Returns origin node. */
236 const HeapGraphNode* GetFromNode() const; 236 const HeapGraphNode* GetFromNode() const;
237 237
238 /** Returns destination node. */ 238 /** Returns destination node. */
239 const HeapGraphNode* GetToNode() const; 239 const HeapGraphNode* GetToNode() const;
240 }; 240 };
241 241
242 242
243 class V8EXPORT HeapGraphPath {
244 public:
245 /** Returns the number of edges in the path. */
246 int GetEdgesCount() const;
247
248 /** Returns an edge from the path. */
249 const HeapGraphEdge* GetEdge(int index) const;
250
251 /** Returns origin node. */
252 const HeapGraphNode* GetFromNode() const;
253
254 /** Returns destination node. */
255 const HeapGraphNode* GetToNode() const;
256 };
257
258
259 /** 243 /**
260 * HeapGraphNode represents a node in a heap graph. 244 * HeapGraphNode represents a node in a heap graph.
261 */ 245 */
262 class V8EXPORT HeapGraphNode { 246 class V8EXPORT HeapGraphNode {
263 public: 247 public:
264 enum Type { 248 enum Type {
265 kHidden = 0, // Hidden node, may be filtered when shown to user. 249 kHidden = 0, // Hidden node, may be filtered when shown to user.
266 kArray = 1, // An array of elements. 250 kArray = 1, // An array of elements.
267 kString = 2, // A string. 251 kString = 2, // A string.
268 kObject = 3, // A JS object (except for arrays and strings). 252 kObject = 3, // A JS object (except for arrays and strings).
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 302
319 /** Retrieves a child by index. */ 303 /** Retrieves a child by index. */
320 const HeapGraphEdge* GetChild(int index) const; 304 const HeapGraphEdge* GetChild(int index) const;
321 305
322 /** Returns retainer nodes count of the node. */ 306 /** Returns retainer nodes count of the node. */
323 int GetRetainersCount() const; 307 int GetRetainersCount() const;
324 308
325 /** Returns a retainer by index. */ 309 /** Returns a retainer by index. */
326 const HeapGraphEdge* GetRetainer(int index) const; 310 const HeapGraphEdge* GetRetainer(int index) const;
327 311
328 /** Returns the number of simple retaining paths from the root to the node. */
329 int GetRetainingPathsCount() const;
330
331 /** Returns a retaining path by index. */
332 const HeapGraphPath* GetRetainingPath(int index) const;
333
334 /** 312 /**
335 * Returns a dominator node. This is the node that participates in every 313 * Returns a dominator node. This is the node that participates in every
336 * path from the snapshot root to the current node. 314 * path from the snapshot root to the current node.
337 */ 315 */
338 const HeapGraphNode* GetDominatorNode() const; 316 const HeapGraphNode* GetDominatorNode() const;
339 }; 317 };
340 318
341 319
342 class V8EXPORT HeapSnapshotsDiff {
343 public:
344 /** Returns the root node for added nodes. */
345 const HeapGraphNode* GetAdditionsRoot() const;
346
347 /** Returns the root node for deleted nodes. */
348 const HeapGraphNode* GetDeletionsRoot() const;
349 };
350
351
352 /** 320 /**
353 * HeapSnapshots record the state of the JS heap at some moment. 321 * HeapSnapshots record the state of the JS heap at some moment.
354 */ 322 */
355 class V8EXPORT HeapSnapshot { 323 class V8EXPORT HeapSnapshot {
356 public: 324 public:
357 enum Type { 325 enum Type {
358 kFull = 0, // Heap snapshot with all instances and references. 326 kFull = 0, // Heap snapshot with all instances and references.
359 kAggregated = 1 // Snapshot doesn't contain individual heap entries, 327 kAggregated = 1 // Snapshot doesn't contain individual heap entries,
360 // instead they are grouped by constructor name. 328 // instead they are grouped by constructor name.
361 }; 329 };
(...skipping 10 matching lines...) Expand all
372 /** Returns heap snapshot title. */ 340 /** Returns heap snapshot title. */
373 Handle<String> GetTitle() const; 341 Handle<String> GetTitle() const;
374 342
375 /** Returns the root node of the heap graph. */ 343 /** Returns the root node of the heap graph. */
376 const HeapGraphNode* GetRoot() const; 344 const HeapGraphNode* GetRoot() const;
377 345
378 /** Returns a node by its id. */ 346 /** Returns a node by its id. */
379 const HeapGraphNode* GetNodeById(uint64_t id) const; 347 const HeapGraphNode* GetNodeById(uint64_t id) const;
380 348
381 /** 349 /**
382 * Returns a diff between this snapshot and another one. Only snapshots
383 * of the same type can be compared.
384 */
385 const HeapSnapshotsDiff* CompareWith(const HeapSnapshot* snapshot) const;
386
387 /**
388 * Deletes the snapshot and removes it from HeapProfiler's list. 350 * Deletes the snapshot and removes it from HeapProfiler's list.
389 * All pointers to nodes, edges and paths previously returned become 351 * All pointers to nodes, edges and paths previously returned become
390 * invalid. 352 * invalid.
391 */ 353 */
392 void Delete(); 354 void Delete();
393 355
394 /** 356 /**
395 * Prepare a serialized representation of the snapshot. The result 357 * Prepare a serialized representation of the snapshot. The result
396 * is written into the stream provided in chunks of specified size. 358 * is written into the stream provided in chunks of specified size.
397 * The total length of the serialized snapshot is unknown in 359 * The total length of the serialized snapshot is unknown in
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after
534 }; 496 };
535 497
536 498
537 } // namespace v8 499 } // namespace v8
538 500
539 501
540 #undef V8EXPORT 502 #undef V8EXPORT
541 503
542 504
543 #endif // V8_V8_PROFILER_H_ 505 #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