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

Side by Side Diff: Source/bindings/v8/ScriptProfiler.h

Issue 14373016: DevTools: [HeapProfiler] Provide API for heap objects tracking info. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: description was slightly changed Created 7 years, 8 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 | Annotate | Revision Log
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2010, Google Inc. All rights reserved. 2 * Copyright (c) 2010, Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 public: 54 public:
55 class HeapSnapshotProgress { 55 class HeapSnapshotProgress {
56 public: 56 public:
57 virtual ~HeapSnapshotProgress() { } 57 virtual ~HeapSnapshotProgress() { }
58 virtual void Start(int totalWork) = 0; 58 virtual void Start(int totalWork) = 0;
59 virtual void Worked(int workDone) = 0; 59 virtual void Worked(int workDone) = 0;
60 virtual void Done() = 0; 60 virtual void Done() = 0;
61 virtual bool isCanceled() = 0; 61 virtual bool isCanceled() = 0;
62 }; 62 };
63 63
64 class OutputStream {
65 public:
66 virtual ~OutputStream() { }
67 virtual void write(const uint32_t* chunk, const int size) = 0;
68 };
69
64 static void collectGarbage(); 70 static void collectGarbage();
65 static ScriptObject objectByHeapObjectId(unsigned id); 71 static ScriptObject objectByHeapObjectId(unsigned id);
66 static unsigned getHeapObjectId(const ScriptValue&); 72 static unsigned getHeapObjectId(const ScriptValue&);
67 static void start(ScriptState* state, const String& title); 73 static void start(ScriptState* state, const String& title);
68 static void startForPage(Page*, const String& title); 74 static void startForPage(Page*, const String& title);
69 static void startForWorkerContext(WorkerContext*, const String& title); 75 static void startForWorkerContext(WorkerContext*, const String& title);
70 static PassRefPtr<ScriptProfile> stop(ScriptState* state, const String& titl e); 76 static PassRefPtr<ScriptProfile> stop(ScriptState* state, const String& titl e);
71 static PassRefPtr<ScriptProfile> stopForPage(Page*, const String& title); 77 static PassRefPtr<ScriptProfile> stopForPage(Page*, const String& title);
72 static PassRefPtr<ScriptProfile> stopForWorkerContext(WorkerContext*, const String& title); 78 static PassRefPtr<ScriptProfile> stopForWorkerContext(WorkerContext*, const String& title);
73 static PassRefPtr<ScriptHeapSnapshot> takeHeapSnapshot(const String& title, HeapSnapshotProgress*); 79 static PassRefPtr<ScriptHeapSnapshot> takeHeapSnapshot(const String& title, HeapSnapshotProgress*);
80 static void startTrackingHeapObjects();
81 static void stopTrackingHeapObjects();
82 static unsigned requestHeapStatsUpdate(OutputStream*);
74 static void initialize(); 83 static void initialize();
75 static void visitNodeWrappers(WrappedNodeVisitor*); 84 static void visitNodeWrappers(WrappedNodeVisitor*);
76 static void visitExternalStrings(ExternalStringVisitor*); 85 static void visitExternalStrings(ExternalStringVisitor*);
77 static void visitExternalArrays(ExternalArrayVisitor*); 86 static void visitExternalArrays(ExternalArrayVisitor*);
78 static void collectBindingMemoryInfo(MemoryInstrumentation*); 87 static void collectBindingMemoryInfo(MemoryInstrumentation*);
79 static size_t profilerSnapshotsSize(); 88 static size_t profilerSnapshotsSize();
80 static HashMap<String, double>* currentProfileNameIdleTimeMap(); 89 static HashMap<String, double>* currentProfileNameIdleTimeMap();
81 }; 90 };
82 91
83 } // namespace WebCore 92 } // namespace WebCore
84 93
85 #endif // ScriptProfiler_h 94 #endif // ScriptProfiler_h
OLDNEW
« no previous file with comments | « no previous file | Source/bindings/v8/ScriptProfiler.cpp » ('j') | Source/bindings/v8/ScriptProfiler.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698