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

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

Issue 1037803002: Return timestamp of the last recorded interval to the caller of HeapProfiler::GetHeapStats (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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
« 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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_V8_PROFILER_H_ 5 #ifndef V8_V8_PROFILER_H_
6 #define V8_V8_PROFILER_H_ 6 #define V8_V8_PROFILER_H_
7 7
8 #include "v8.h" 8 #include "v8.h"
9 9
10 /** 10 /**
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 */ 464 */
465 void StartTrackingHeapObjects(bool track_allocations = false); 465 void StartTrackingHeapObjects(bool track_allocations = false);
466 466
467 /** 467 /**
468 * Adds a new time interval entry to the aggregated statistics array. The 468 * Adds a new time interval entry to the aggregated statistics array. The
469 * time interval entry contains information on the current heap objects 469 * time interval entry contains information on the current heap objects
470 * population size. The method also updates aggregated statistics and 470 * population size. The method also updates aggregated statistics and
471 * reports updates for all previous time intervals via the OutputStream 471 * reports updates for all previous time intervals via the OutputStream
472 * object. Updates on each time interval are provided as a stream of the 472 * object. Updates on each time interval are provided as a stream of the
473 * HeapStatsUpdate structure instances. 473 * HeapStatsUpdate structure instances.
474 * The return value of the function is the last seen heap object Id. 474 * If |timestamp_us| is supplied, timestamp of the new entry will be written
475 * into it. The return value of the function is the last seen heap object Id.
475 * 476 *
476 * StartTrackingHeapObjects must be called before the first call to this 477 * StartTrackingHeapObjects must be called before the first call to this
477 * method. 478 * method.
478 */ 479 */
479 SnapshotObjectId GetHeapStats(OutputStream* stream); 480 SnapshotObjectId GetHeapStats(OutputStream* stream,
481 int64_t* timestamp_us = NULL);
480 482
481 /** 483 /**
482 * Stops tracking of heap objects population statistics, cleans up all 484 * Stops tracking of heap objects population statistics, cleans up all
483 * collected data. StartHeapObjectsTracking must be called again prior to 485 * collected data. StartHeapObjectsTracking must be called again prior to
484 * calling PushHeapObjectsStats next time. 486 * calling GetHeapStats next time.
485 */ 487 */
486 void StopTrackingHeapObjects(); 488 void StopTrackingHeapObjects();
487 489
488 /** 490 /**
489 * Deletes all snapshots taken. All previously returned pointers to 491 * Deletes all snapshots taken. All previously returned pointers to
490 * snapshots and their contents become invalid after this call. 492 * snapshots and their contents become invalid after this call.
491 */ 493 */
492 void DeleteAllHeapSnapshots(); 494 void DeleteAllHeapSnapshots();
493 495
494 /** Binds a callback to embedder's class ID. */ 496 /** Binds a callback to embedder's class ID. */
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
603 uint32_t index; // Index of the time interval that was changed. 605 uint32_t index; // Index of the time interval that was changed.
604 uint32_t count; // New value of count field for the interval with this index. 606 uint32_t count; // New value of count field for the interval with this index.
605 uint32_t size; // New value of size field for the interval with this index. 607 uint32_t size; // New value of size field for the interval with this index.
606 }; 608 };
607 609
608 610
609 } // namespace v8 611 } // namespace v8
610 612
611 613
612 #endif // V8_V8_PROFILER_H_ 614 #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