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

Side by Side Diff: src/inspector/V8HeapProfilerAgentImpl.h

Issue 2300823002: Revert of [inspector] Initial import of v8_inspector. (Closed)
Patch Set: Created 4 years, 3 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 | « src/inspector/V8FunctionCall.cpp ('k') | src/inspector/V8HeapProfilerAgentImpl.cpp » ('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 2016 the V8 project 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 V8_INSPECTOR_V8HEAPPROFILERAGENTIMPL_H_
6 #define V8_INSPECTOR_V8HEAPPROFILERAGENTIMPL_H_
7
8 #include "src/inspector/Allocator.h"
9 #include "src/inspector/protocol/Forward.h"
10 #include "src/inspector/protocol/HeapProfiler.h"
11
12 #include <v8.h>
13
14 namespace v8_inspector {
15
16 class V8InspectorSessionImpl;
17
18 using protocol::ErrorString;
19 using protocol::Maybe;
20
21 class V8HeapProfilerAgentImpl : public protocol::HeapProfiler::Backend {
22 V8_INSPECTOR_DISALLOW_COPY(V8HeapProfilerAgentImpl);
23 public:
24 V8HeapProfilerAgentImpl(V8InspectorSessionImpl*, protocol::FrontendChannel*, protocol::DictionaryValue* state);
25 ~V8HeapProfilerAgentImpl() override;
26 void restore();
27
28 void collectGarbage(ErrorString*) override;
29
30 void enable(ErrorString*) override;
31 void startTrackingHeapObjects(ErrorString*, const Maybe<bool>& trackAllocati ons) override;
32 void stopTrackingHeapObjects(ErrorString*, const Maybe<bool>& reportProgress ) override;
33
34 void disable(ErrorString*) override;
35
36 void takeHeapSnapshot(ErrorString*, const Maybe<bool>& reportProgress) overr ide;
37
38 void getObjectByHeapObjectId(ErrorString*, const String16& heapSnapshotObjec tId, const Maybe<String16>& objectGroup, std::unique_ptr<protocol::Runtime::Remo teObject>* result) override;
39 void addInspectedHeapObject(ErrorString*, const String16& inspectedHeapObjec tId) override;
40 void getHeapObjectId(ErrorString*, const String16& objectId, String16* heapS napshotObjectId) override;
41
42 void startSampling(ErrorString*, const Maybe<double>& samplingInterval) over ride;
43 void stopSampling(ErrorString*, std::unique_ptr<protocol::HeapProfiler::Samp lingHeapProfile>*) override;
44
45 private:
46 void startTrackingHeapObjectsInternal(bool trackAllocations);
47 void stopTrackingHeapObjectsInternal();
48 void requestHeapStatsUpdate();
49 static void onTimer(void*);
50
51 V8InspectorSessionImpl* m_session;
52 v8::Isolate* m_isolate;
53 protocol::HeapProfiler::Frontend m_frontend;
54 protocol::DictionaryValue* m_state;
55 bool m_hasTimer;
56 };
57
58 } // namespace v8_inspector
59
60 #endif // V8_INSPECTOR_V8HEAPPROFILERAGENTIMPL_H_
OLDNEW
« no previous file with comments | « src/inspector/V8FunctionCall.cpp ('k') | src/inspector/V8HeapProfilerAgentImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698