Title: [89973] trunk/Source/_javascript_Core
Revision
89973
Author
[email protected]
Date
2011-06-28 16:26:54 -0700 (Tue, 28 Jun 2011)

Log Message

2011-06-28  Oliver Hunt  <[email protected]>

        Reviewed by Gavin Barraclough.

        Fix sampling build
        https://bugs.webkit.org/show_bug.cgi?id=63579

        Gets opcode sampling building again, doesn't seem to work alas

        * bytecode/SamplingTool.cpp:
        (JSC::SamplingTool::notifyOfScope):
        * bytecode/SamplingTool.h:
        (JSC::SamplingTool::SamplingTool):
        * interpreter/Interpreter.cpp:
        (JSC::Interpreter::enableSampler):
        * runtime/Executable.h:
        (JSC::ScriptExecutable::ScriptExecutable):

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (89972 => 89973)


--- trunk/Source/_javascript_Core/ChangeLog	2011-06-28 23:11:30 UTC (rev 89972)
+++ trunk/Source/_javascript_Core/ChangeLog	2011-06-28 23:26:54 UTC (rev 89973)
@@ -1,3 +1,21 @@
+2011-06-28  Oliver Hunt  <[email protected]>
+
+        Reviewed by Gavin Barraclough.
+
+        Fix sampling build
+        https://bugs.webkit.org/show_bug.cgi?id=63579
+
+        Gets opcode sampling building again, doesn't seem to work alas
+
+        * bytecode/SamplingTool.cpp:
+        (JSC::SamplingTool::notifyOfScope):
+        * bytecode/SamplingTool.h:
+        (JSC::SamplingTool::SamplingTool):
+        * interpreter/Interpreter.cpp:
+        (JSC::Interpreter::enableSampler):
+        * runtime/Executable.h:
+        (JSC::ScriptExecutable::ScriptExecutable):
+
 2011-06-28  Cary Clark  <[email protected]>
 
         Reviewed by James Robinson.

Modified: trunk/Source/_javascript_Core/bytecode/SamplingTool.cpp (89972 => 89973)


--- trunk/Source/_javascript_Core/bytecode/SamplingTool.cpp	2011-06-28 23:11:30 UTC (rev 89972)
+++ trunk/Source/_javascript_Core/bytecode/SamplingTool.cpp	2011-06-28 23:26:54 UTC (rev 89973)
@@ -209,12 +209,13 @@
     s_samplingTool->doRun();
 }
 
-void SamplingTool::notifyOfScope(ScriptExecutable* script)
+void SamplingTool::notifyOfScope(JSGlobalData& globalData, ScriptExecutable* script)
 {
 #if ENABLE(CODEBLOCK_SAMPLING)
     MutexLocker locker(m_scriptSampleMapMutex);
-    m_scopeSampleMap->set(script, new ScriptSampleRecord(script));
+    m_scopeSampleMap->set(script, new ScriptSampleRecord(globalData, script));
 #else
+    UNUSED_PARAM(globalData);
     UNUSED_PARAM(script);
 #endif
 }

Modified: trunk/Source/_javascript_Core/bytecode/SamplingTool.h (89972 => 89973)


--- trunk/Source/_javascript_Core/bytecode/SamplingTool.h	2011-06-28 23:11:30 UTC (rev 89972)
+++ trunk/Source/_javascript_Core/bytecode/SamplingTool.h	2011-06-28 23:26:54 UTC (rev 89973)
@@ -201,7 +201,7 @@
             , m_sampleCount(0)
             , m_opcodeSampleCount(0)
 #if ENABLE(CODEBLOCK_SAMPLING)
-            , m_scopeSampleMap(new ScriptSampleRecordMap())
+            , m_scopeSampleMap(adoptPtr(new ScriptSampleRecordMap()))
 #endif
         {
             memset(m_opcodeSamples, 0, sizeof(m_opcodeSamples));
@@ -218,7 +218,7 @@
         void setup();
         void dump(ExecState*);
 
-        void notifyOfScope(ScriptExecutable* scope);
+        void notifyOfScope(JSGlobalData&, ScriptExecutable* scope);
 
         void sample(CodeBlock* codeBlock, Instruction* vPC)
         {

Modified: trunk/Source/_javascript_Core/interpreter/Interpreter.cpp (89972 => 89973)


--- trunk/Source/_javascript_Core/interpreter/Interpreter.cpp	2011-06-28 23:11:30 UTC (rev 89972)
+++ trunk/Source/_javascript_Core/interpreter/Interpreter.cpp	2011-06-28 23:26:54 UTC (rev 89973)
@@ -4960,7 +4960,7 @@
 {
 #if ENABLE(OPCODE_SAMPLING)
     if (!m_sampler) {
-        m_sampler.set(new SamplingTool(this));
+        m_sampler = adoptPtr(new SamplingTool(this));
         m_sampler->setup();
     }
 #endif

Modified: trunk/Source/_javascript_Core/runtime/Executable.h (89972 => 89973)


--- trunk/Source/_javascript_Core/runtime/Executable.h	2011-06-28 23:11:30 UTC (rev 89972)
+++ trunk/Source/_javascript_Core/runtime/Executable.h	2011-06-28 23:26:54 UTC (rev 89973)
@@ -169,9 +169,8 @@
             , m_features(isInStrictContext ? StrictModeFeature : 0)
         {
 #if ENABLE(CODEBLOCK_SAMPLING)
-            relaxAdoptionRequirement();
             if (SamplingTool* sampler = globalData->interpreter->sampler())
-                sampler->notifyOfScope(this);
+                sampler->notifyOfScope(*globalData, this);
 #else
             UNUSED_PARAM(globalData);
 #endif
@@ -183,9 +182,8 @@
             , m_features(isInStrictContext ? StrictModeFeature : 0)
         {
 #if ENABLE(CODEBLOCK_SAMPLING)
-            relaxAdoptionRequirement();
             if (SamplingTool* sampler = exec->globalData().interpreter->sampler())
-                sampler->notifyOfScope(this);
+                sampler->notifyOfScope(exec->globalData(), this);
 #else
             UNUSED_PARAM(exec);
 #endif
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes

Reply via email to