#include "Profile.h"
#include <wtf/PassRefPtr.h>
#include <wtf/RefPtr.h>
+#include <wtf/Stopwatch.h>
#include <wtf/Vector.h>
namespace JSC {
class ExecState;
-class VM;
class JSGlobalObject;
class JSObject;
class JSValue;
class LegacyProfiler {
WTF_MAKE_FAST_ALLOCATED;
public:
- JS_EXPORT_PRIVATE static LegacyProfiler* profiler();
+ JS_EXPORT_PRIVATE static LegacyProfiler* profiler();
static CallIdentifier createCallIdentifier(ExecState*, JSValue, const WTF::String& sourceURL, unsigned defaultLineNumber, unsigned defaultColumnNumber);
- JS_EXPORT_PRIVATE void startProfiling(ExecState*, const WTF::String& title);
- JS_EXPORT_PRIVATE PassRefPtr<Profile> stopProfiling(ExecState*, const WTF::String& title);
+ JS_EXPORT_PRIVATE void startProfiling(ExecState*, const WTF::String& title, PassRefPtr<Stopwatch>);
+ JS_EXPORT_PRIVATE RefPtr<Profile> stopProfiling(ExecState*, const WTF::String& title);
void stopProfiling(JSGlobalObject*);
+ // Used to ignore profile node subtrees rooted at InjectedScript calls.
+ JS_EXPORT_PRIVATE void suspendProfiling(ExecState*);
+ JS_EXPORT_PRIVATE void unsuspendProfiling(ExecState*);
+
void willExecute(ExecState* callerCallFrame, JSValue function);
void willExecute(ExecState* callerCallFrame, const WTF::String& sourceURL, unsigned startingLineNumber, unsigned startingColumnNumber);
void didExecute(ExecState* callerCallFrame, JSValue function);