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

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

Issue 293963003: Remove ScriptObject (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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 25 matching lines...) Expand all
36 36
37 #include "wtf/Forward.h" 37 #include "wtf/Forward.h"
38 #include "wtf/PassRefPtr.h" 38 #include "wtf/PassRefPtr.h"
39 #include "wtf/text/WTFString.h" 39 #include "wtf/text/WTFString.h"
40 40
41 namespace WebCore { 41 namespace WebCore {
42 42
43 class ExternalStringVisitor; 43 class ExternalStringVisitor;
44 class WrappedNodeVisitor; 44 class WrappedNodeVisitor;
45 class Page; 45 class Page;
46 class ScriptObject;
47 class ScriptValue; 46 class ScriptValue;
48 class WorkerGlobalScope; 47 class WorkerGlobalScope;
49 48
50 class ScriptProfiler { 49 class ScriptProfiler {
51 WTF_MAKE_NONCOPYABLE(ScriptProfiler); 50 WTF_MAKE_NONCOPYABLE(ScriptProfiler);
52 public: 51 public:
53 class HeapSnapshotProgress { 52 class HeapSnapshotProgress {
54 public: 53 public:
55 virtual ~HeapSnapshotProgress() { } 54 virtual ~HeapSnapshotProgress() { }
56 virtual void Start(int totalWork) = 0; 55 virtual void Start(int totalWork) = 0;
57 virtual void Worked(int workDone) = 0; 56 virtual void Worked(int workDone) = 0;
58 virtual void Done() = 0; 57 virtual void Done() = 0;
59 virtual bool isCanceled() = 0; 58 virtual bool isCanceled() = 0;
60 }; 59 };
61 60
62 class OutputStream { 61 class OutputStream {
63 public: 62 public:
64 virtual ~OutputStream() { } 63 virtual ~OutputStream() { }
65 virtual void write(const uint32_t* chunk, const int size) = 0; 64 virtual void write(const uint32_t* chunk, const int size) = 0;
66 }; 65 };
67 66
68 static void collectGarbage(); 67 static void collectGarbage();
69 static ScriptObject objectByHeapObjectId(unsigned id); 68 static ScriptValue objectByHeapObjectId(unsigned id);
70 static unsigned getHeapObjectId(const ScriptValue&); 69 static unsigned getHeapObjectId(const ScriptValue&);
71 static void clearHeapObjectIds(); 70 static void clearHeapObjectIds();
72 static void setSamplingInterval(int intervalUs); 71 static void setSamplingInterval(int intervalUs);
73 static void start(const String& title); 72 static void start(const String& title);
74 static PassRefPtr<ScriptProfile> stop(const String& title); 73 static PassRefPtr<ScriptProfile> stop(const String& title);
75 static PassRefPtr<ScriptHeapSnapshot> takeHeapSnapshot(const String& title, HeapSnapshotProgress*); 74 static PassRefPtr<ScriptHeapSnapshot> takeHeapSnapshot(const String& title, HeapSnapshotProgress*);
76 static void startTrackingHeapObjects(bool trackAllocations); 75 static void startTrackingHeapObjects(bool trackAllocations);
77 static void stopTrackingHeapObjects(); 76 static void stopTrackingHeapObjects();
78 static unsigned requestHeapStatsUpdate(OutputStream*); 77 static unsigned requestHeapStatsUpdate(OutputStream*);
79 static void initialize(); 78 static void initialize();
80 static void visitNodeWrappers(WrappedNodeVisitor*); 79 static void visitNodeWrappers(WrappedNodeVisitor*);
81 static HashMap<String, double>* currentProfileNameIdleTimeMap(); 80 static HashMap<String, double>* currentProfileNameIdleTimeMap();
82 static void setIdle(bool isIdle); 81 static void setIdle(bool isIdle);
83 }; 82 };
84 83
85 } // namespace WebCore 84 } // namespace WebCore
86 85
87 #endif // ScriptProfiler_h 86 #endif // ScriptProfiler_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698