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

Side by Side Diff: content/public/renderer/v8_heap_statistics_collector.h

Issue 196103006: Add V8 heap statistics in a time-line manner in tracing. (Closed) Base URL: /home/dmikurube/repos/chromium@work-sai-json
Patch Set: addressed Created 6 years, 5 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 | « content/content_renderer.gypi ('k') | content/renderer/render_thread_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_PUBLIC_RENDERER_V8_HEAP_STATISTICS_COLLECTOR_H_
6 #define CONTENT_PUBLIC_RENDERER_V8_HEAP_STATISTICS_COLLECTOR_H_
7
8 #include "base/callback.h"
9 #include "content/common/content_export.h"
10
11 namespace base {
12 class Value;
13 }
14
15 namespace content {
16
17 // Retrieves statistics about v8, asynchronously.
18 class CONTENT_EXPORT V8HeapStatisticsCollector {
19 public:
20 static V8HeapStatisticsCollector* Instance();
21 virtual ~V8HeapStatisticsCollector() {}
22
23 struct Statistics {
24 Statistics() : total_bytes(0), used_bytes(0) {}
25 size_t total_bytes;
26 size_t used_bytes;
27 };
28 typedef base::Callback<void(const Statistics&)> ResultCallback;
29
30 // Begins collecting heap statistics. Only one collection can be pending at
31 // once. Returns true on success. Callback will not be called if initiation
32 // fails.
33 //
34 // Must be called on the RenderThread.
35 virtual bool InitiateCollection(const ResultCallback& callback) = 0;
36 };
37
38 } // namespace content
39
40 #endif // CONTENT_PUBLIC_RENDERER_V8_HEAP_STATISTICS_COLLECTOR_H_
OLDNEW
« no previous file with comments | « content/content_renderer.gypi ('k') | content/renderer/render_thread_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698