Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (173161 => 173162)
--- trunk/Source/_javascript_Core/ChangeLog 2014-09-01 19:16:14 UTC (rev 173161)
+++ trunk/Source/_javascript_Core/ChangeLog 2014-09-01 21:15:21 UTC (rev 173162)
@@ -1,3 +1,18 @@
+2014-09-01 Brian J. Burg <[email protected]>
+
+ Provide column numbers to DTrace willExecute/didExecute probes
+ https://bugs.webkit.org/show_bug.cgi?id=136434
+
+ Reviewed by Antti Koivisto.
+
+ Provide the columnNumber and update stubs for !HAVE(DTRACE).
+
+ * profiler/ProfileGenerator.cpp:
+ (JSC::ProfileGenerator::willExecute):
+ (JSC::ProfileGenerator::didExecute):
+ * runtime/Tracing.d:
+ * runtime/Tracing.h:
+
2014-09-01 Gyuyoung Kim <[email protected]>
[CMAKE] Build warning by INTERFACE_LINK_LIBRARIES
Modified: trunk/Source/_javascript_Core/profiler/ProfileGenerator.cpp (173161 => 173162)
--- trunk/Source/_javascript_Core/profiler/ProfileGenerator.cpp 2014-09-01 19:16:14 UTC (rev 173161)
+++ trunk/Source/_javascript_Core/profiler/ProfileGenerator.cpp 2014-09-01 21:15:21 UTC (rev 173162)
@@ -111,7 +111,7 @@
if (_javascript_CORE_PROFILE_WILL_EXECUTE_ENABLED()) {
CString name = callIdentifier.functionName().utf8();
CString url = ""
- _javascript_CORE_PROFILE_WILL_EXECUTE(m_profileGroup, const_cast<char*>(name.data()), const_cast<char*>(url.data()), callIdentifier.lineNumber());
+ _javascript_CORE_PROFILE_WILL_EXECUTE(m_profileGroup, const_cast<char*>(name.data()), const_cast<char*>(url.data()), callIdentifier.lineNumber(), callIdentifier.columnNumber());
}
if (!m_origin)
@@ -126,7 +126,7 @@
if (_javascript_CORE_PROFILE_DID_EXECUTE_ENABLED()) {
CString name = callIdentifier.functionName().utf8();
CString url = ""
- _javascript_CORE_PROFILE_DID_EXECUTE(m_profileGroup, const_cast<char*>(name.data()), const_cast<char*>(url.data()), callIdentifier.lineNumber());
+ _javascript_CORE_PROFILE_DID_EXECUTE(m_profileGroup, const_cast<char*>(name.data()), const_cast<char*>(url.data()), callIdentifier.lineNumber(), callIdentifier.columnNumber());
}
if (!m_origin)
Modified: trunk/Source/_javascript_Core/runtime/Tracing.d (173161 => 173162)
--- trunk/Source/_javascript_Core/runtime/Tracing.d 2014-09-01 19:16:14 UTC (rev 173161)
+++ trunk/Source/_javascript_Core/runtime/Tracing.d 2014-09-01 21:15:21 UTC (rev 173162)
@@ -28,9 +28,9 @@
probe gc__begin();
probe gc__marked();
probe gc__end();
-
- probe profile__will_execute(int, char*, char*, int);
- probe profile__did_execute(int, char*, char*, int);
+
+ probe profile__will_execute(int, char*, char*, int, int);
+ probe profile__did_execute(int, char*, char*, int, int);
};
#pragma D attributes Unstable/Unstable/Common provider _javascript_Core provider
Modified: trunk/Source/_javascript_Core/runtime/Tracing.h (173161 => 173162)
--- trunk/Source/_javascript_Core/runtime/Tracing.h 2014-09-01 19:16:14 UTC (rev 173161)
+++ trunk/Source/_javascript_Core/runtime/Tracing.h 2014-09-01 21:15:21 UTC (rev 173162)
@@ -39,10 +39,10 @@
#define _javascript_CORE_GC_MARKED()
#define _javascript_CORE_GC_MARKED_ENABLED() 0
-#define _javascript_CORE_PROFILE_WILL_EXECUTE(arg0, arg1, arg2, arg3)
+#define _javascript_CORE_PROFILE_WILL_EXECUTE(arg0, arg1, arg2, arg3, arg4)
#define _javascript_CORE_PROFILE_WILL_EXECUTE_ENABLED() 0
-#define _javascript_CORE_PROFILE_DID_EXECUTE(arg0, arg1, arg2, arg3)
+#define _javascript_CORE_PROFILE_DID_EXECUTE(arg0, arg1, arg2, arg3, arg4)
#define _javascript_CORE_PROFILE_DID_EXECUTE_ENABLED() 0
#endif
Modified: trunk/Tools/ChangeLog (173161 => 173162)
--- trunk/Tools/ChangeLog 2014-09-01 19:16:14 UTC (rev 173161)
+++ trunk/Tools/ChangeLog 2014-09-01 21:15:21 UTC (rev 173162)
@@ -1,3 +1,15 @@
+2014-09-01 Brian J. Burg <[email protected]>
+
+ Provide column numbers to DTrace willExecute/didExecute probes
+ https://bugs.webkit.org/show_bug.cgi?id=136434
+
+ Reviewed by Antti Koivisto.
+
+ Create a directory for DTrace scripts. Add an example script that
+ shows how to use static probes provided by _javascript_Core's profiler.
+
+ * Scripts/dtrace/jsc-trace-profiler-events.d: Added.
+
2014-09-01 Carlos Alberto Lopez Perez <[email protected]>
[GTK] [JHBuild] Cyclic dependency between cairo and librsvg.
Added: trunk/Tools/Scripts/dtrace/jsc-trace-profiler-events.d (0 => 173162)
--- trunk/Tools/Scripts/dtrace/jsc-trace-profiler-events.d (rev 0)
+++ trunk/Tools/Scripts/dtrace/jsc-trace-profiler-events.d 2014-09-01 21:15:21 UTC (rev 173162)
@@ -0,0 +1,47 @@
+#!/usr/sbin/dtrace -qs
+
+/*
+ * Copyright (C) 2014 University of Washington. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+/*
+ * DTrace example: tracing function calls when the profiler is enabled.
+ * To use this, first enable the _javascript_ tracing profiler using the Web Inspector.
+ *
+ * These run for any process; restrict to a pid by changing the provider to _javascript_Core$target
+ * and passing the arguments '-p <pid>' to the script.
+ */
+
+_javascript_Core*:::profile-will_execute
+{
+ printf("[%d] -> %s (%s:%d:%d)\n",arg0, copyinstr(arg1), copyinstr(arg2), arg3, arg4);
+}
+
+_javascript_Core*:::profile-did_execute
+{
+ printf("[%d] <- %s (%s:%d:%d)\n",arg0, copyinstr(arg1), copyinstr(arg2), arg3, arg4);
+}
Property changes on: trunk/Tools/Scripts/dtrace/jsc-trace-profiler-events.d
___________________________________________________________________
Added: svn:executable