diff options
author | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2017-05-30 12:48:17 +0200 |
---|---|---|
committer | Oswald Buddenhagen <oswald.buddenhagen@qt.io> | 2017-05-30 12:48:17 +0200 |
commit | 881da28418d380042aa95a97f0cbd42560a64f7c (patch) | |
tree | a794dff3274695e99c651902dde93d934ea7a5af /Source/JavaScriptCore/profiler/ProfilerDatabase.h | |
parent | 7e104c57a70fdf551bb3d22a5d637cdcbc69dbea (diff) | |
parent | 0fcedcd17cc00d3dd44c718b3cb36c1033319671 (diff) | |
download | qtwebkit-881da28418d380042aa95a97f0cbd42560a64f7c.tar.gz |
Merge 'wip/next' into dev
Change-Id: Iff9ee5e23bb326c4371ec8ed81d56f2f05d680e9
Diffstat (limited to 'Source/JavaScriptCore/profiler/ProfilerDatabase.h')
-rw-r--r-- | Source/JavaScriptCore/profiler/ProfilerDatabase.h | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Source/JavaScriptCore/profiler/ProfilerDatabase.h b/Source/JavaScriptCore/profiler/ProfilerDatabase.h index 172c8eeac..9bb64cf49 100644 --- a/Source/JavaScriptCore/profiler/ProfilerDatabase.h +++ b/Source/JavaScriptCore/profiler/ProfilerDatabase.h @@ -30,11 +30,13 @@ #include "ProfilerBytecodes.h" #include "ProfilerCompilation.h" #include "ProfilerCompilationKind.h" -#include <wtf/FastAllocBase.h> +#include <wtf/FastMalloc.h> #include <wtf/HashMap.h> +#include <wtf/Lock.h> #include <wtf/Noncopyable.h> #include <wtf/PassRefPtr.h> #include <wtf/SegmentedVector.h> +#include <wtf/ThreadingPrimitives.h> #include <wtf/text/WTFString.h> namespace JSC { namespace Profiler { @@ -50,8 +52,7 @@ public: Bytecodes* ensureBytecodesFor(CodeBlock*); void notifyDestruction(CodeBlock*); - PassRefPtr<Compilation> newCompilation(CodeBlock*, CompilationKind); - PassRefPtr<Compilation> newCompilation(Bytecodes*, CompilationKind); + void addCompilation(PassRefPtr<Compilation>); // Converts the database to a JavaScript object that is suitable for JSON stringification. // Note that it's probably a good idea to use an ExecState* associated with a global @@ -70,7 +71,6 @@ public: void registerToSaveAtExit(const char* filename); private: - void addDatabaseToAtExit(); void removeDatabaseFromAtExit(); void performAtExitSave() const; @@ -81,10 +81,11 @@ private: VM& m_vm; SegmentedVector<Bytecodes> m_bytecodes; HashMap<CodeBlock*, Bytecodes*> m_bytecodesMap; - Vector<RefPtr<Compilation> > m_compilations; + Vector<RefPtr<Compilation>> m_compilations; bool m_shouldSaveAtExit; CString m_atExitSaveFilename; Database* m_nextRegisteredDatabase; + Lock m_lock; }; } } // namespace JSC::Profiler |