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

Side by Side Diff: third_party/WebKit/Source/platform/MemoryUsageProvider.h

Issue 1670463002: [Oilpan] Unify memory usage reporters of Oilpan (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Watch out only Oilpan heap usages Created 4 years, 10 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 2016 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 MemoryUsageProvider_h
6 #define MemoryUsageProvider_h
7
8 #include "public/platform/WebCommon.h"
9 #include "public/platform/WebMemoryDumpProvider.h"
10 #include "wtf/Allocator.h"
11 #include "wtf/Noncopyable.h"
12
13 namespace v8 {
14 class Isolate;
15 }
16
17 namespace blink {
18
19 class MemoryUsageProvider {
20 USING_FAST_MALLOC(MemoryUsageProvider);
21 WTF_MAKE_NONCOPYABLE(MemoryUsageProvider);
22 public:
23 // Returns a thread specific instance.
24 static MemoryUsageProvider* instance();
25
26 MemoryUsageProvider();
27 ~MemoryUsageProvider();
28
29 void setIsolate(v8::Isolate* isolate) { m_isolate = isolate; }
30
31 // Returns if it reported the memory usage.
32 bool adjustAmountOfAllocatedMemory();
33
34 private:
35 v8::Isolate* m_isolate;
36 int64_t m_previousSize;
37 };
38
39 } // namespace blink
40
41 #endif // PartitionAllocMemoryDumpProvider_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698