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

Side by Side Diff: content/renderer/v8_heap_statistics_collector_impl.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: rebased 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
OLDNEW
(Empty)
1 // Copyright 2013 The Chromium Authors. All rights reserved.
fmeawad 2014/07/10 18:22:23 2014?
Dai Mikurube (NOT FULLTIME) 2014/07/11 04:34:38 Done.
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_RENDERER_V8_HEAP_STATISTICS_COLLECTOR_IMPL_H_
6 #define CONTENT_RENDERER_V8_HEAP_STATISTICS_COLLECTOR_IMPL_H_
7
8 #include "base/memory/ref_counted.h"
9 #include "base/task_runner.h"
10 #include "content/public/renderer/v8_heap_statistics_collector.h"
11
12 namespace content {
13
14 class V8HeapStatisticsCollectorImpl : public V8HeapStatisticsCollector {
15 public:
16 V8HeapStatisticsCollectorImpl();
17 static V8HeapStatisticsCollector* Instance();
18
19 // V8ValueConverter implementation.
20 virtual bool InitiateCollection(const ResultCallback&) OVERRIDE;
21
22 private:
23 virtual ~V8HeapStatisticsCollectorImpl();
24 void CollectOnWorkerThread(scoped_refptr<base::TaskRunner> master,
25 int round_id);
26 void ReceiveStats(int round_id, size_t total_size, size_t used_size);
27 void SendStatsToCallback(int round_id);
28
29 Statistics pending_stats_;
30 int workers_to_go_;
31 int round_id_;
32 scoped_ptr<ResultCallback> pending_result_callback_;
33
34 DISALLOW_COPY_AND_ASSIGN(V8HeapStatisticsCollectorImpl);
35 };
36
37 } // namespace content
38
39 #endif // CONTENT_RENDERER_V8_HEAP_STATISTICS_COLLECTOR_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698