Title: [213702] trunk/Source/_javascript_Core
Revision
213702
Author
[email protected]
Date
2017-03-09 21:18:28 -0800 (Thu, 09 Mar 2017)

Log Message

Unreviewed, rolling out r213695.

This change broke the Windows build.

Reverted changeset:

"Implement a StackTrace utility object that can capture stack
traces for debugging."
https://bugs.webkit.org/show_bug.cgi?id=169454
http://trac.webkit.org/changeset/213695

Modified Paths

Removed Paths

Diff

Modified: trunk/Source/_javascript_Core/CMakeLists.txt (213701 => 213702)


--- trunk/Source/_javascript_Core/CMakeLists.txt	2017-03-10 05:08:40 UTC (rev 213701)
+++ trunk/Source/_javascript_Core/CMakeLists.txt	2017-03-10 05:18:28 UTC (rev 213702)
@@ -922,7 +922,6 @@
     tools/JSDollarVM.cpp
     tools/JSDollarVMPrototype.cpp
     tools/SigillCrashAnalyzer.cpp
-    tools/StackTrace.cpp
     tools/VMInspector.cpp
 
     wasm/JSWebAssembly.cpp

Modified: trunk/Source/_javascript_Core/ChangeLog (213701 => 213702)


--- trunk/Source/_javascript_Core/ChangeLog	2017-03-10 05:08:40 UTC (rev 213701)
+++ trunk/Source/_javascript_Core/ChangeLog	2017-03-10 05:18:28 UTC (rev 213702)
@@ -1,3 +1,16 @@
+2017-03-09  Ryan Haddad  <[email protected]>
+
+        Unreviewed, rolling out r213695.
+
+        This change broke the Windows build.
+
+        Reverted changeset:
+
+        "Implement a StackTrace utility object that can capture stack
+        traces for debugging."
+        https://bugs.webkit.org/show_bug.cgi?id=169454
+        http://trac.webkit.org/changeset/213695
+
 2017-03-09  Caio Lima  <[email protected]>
 
         [ESnext] Implement Object Rest - Implementing Object Rest Destructuring

Modified: trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj (213701 => 213702)


--- trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj	2017-03-10 05:08:40 UTC (rev 213701)
+++ trunk/Source/_javascript_Core/_javascript_Core.xcodeproj/project.pbxproj	2017-03-10 05:18:28 UTC (rev 213702)
@@ -2365,8 +2365,6 @@
 		FE1BD0211E72027900134BC9 /* CellProfile.h in Headers */ = {isa = PBXBuildFile; fileRef = FE1BD0201E72027000134BC9 /* CellProfile.h */; };
 		FE1BD0241E72053800134BC9 /* HeapVerifier.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FE1BD0221E72052F00134BC9 /* HeapVerifier.cpp */; };
 		FE1BD0251E72053800134BC9 /* HeapVerifier.h in Headers */ = {isa = PBXBuildFile; fileRef = FE1BD0231E72052F00134BC9 /* HeapVerifier.h */; };
-		FE1BD02B1E721B4C00134BC9 /* StackTrace.h in Headers */ = {isa = PBXBuildFile; fileRef = FE1BD02A1E721B3700134BC9 /* StackTrace.h */; };
-		FE1BD02C1E721B5100134BC9 /* StackTrace.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FE1BD0291E721B3700134BC9 /* StackTrace.cpp */; };
 		FE1C0FFD1B193E9800B53FCA /* Exception.h in Headers */ = {isa = PBXBuildFile; fileRef = FE1C0FFC1B193E9800B53FCA /* Exception.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		FE1C0FFF1B194FD100B53FCA /* Exception.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FE1C0FFE1B194FD100B53FCA /* Exception.cpp */; };
 		FE20CE9D15F04A9500DF3430 /* LLIntCLoop.cpp in Sources */ = {isa = PBXBuildFile; fileRef = FE20CE9B15F04A9500DF3430 /* LLIntCLoop.cpp */; };
@@ -4947,8 +4945,6 @@
 		FE1BD0201E72027000134BC9 /* CellProfile.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CellProfile.h; sourceTree = "<group>"; };
 		FE1BD0221E72052F00134BC9 /* HeapVerifier.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = HeapVerifier.cpp; sourceTree = "<group>"; };
 		FE1BD0231E72052F00134BC9 /* HeapVerifier.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HeapVerifier.h; sourceTree = "<group>"; };
-		FE1BD0291E721B3700134BC9 /* StackTrace.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = StackTrace.cpp; sourceTree = "<group>"; };
-		FE1BD02A1E721B3700134BC9 /* StackTrace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StackTrace.h; sourceTree = "<group>"; };
 		FE1C0FFC1B193E9800B53FCA /* Exception.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Exception.h; sourceTree = "<group>"; };
 		FE1C0FFE1B194FD100B53FCA /* Exception.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Exception.cpp; sourceTree = "<group>"; };
 		FE20CE9B15F04A9500DF3430 /* LLIntCLoop.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LLIntCLoop.cpp; path = llint/LLIntCLoop.cpp; sourceTree = "<group>"; };
@@ -6942,8 +6938,6 @@
 				86B5822C14D22F5F00A9C306 /* ProfileTreeNode.h */,
 				FE3022D01E3D739600BAC493 /* SigillCrashAnalyzer.cpp */,
 				FE3022D11E3D739600BAC493 /* SigillCrashAnalyzer.h */,
-				FE1BD0291E721B3700134BC9 /* StackTrace.cpp */,
-				FE1BD02A1E721B3700134BC9 /* StackTrace.h */,
 				86B5826A14D35D5100A9C306 /* TieredMMapArray.h */,
 				FE3022D41E42856700BAC493 /* VMInspector.cpp */,
 				FE3022D51E42856700BAC493 /* VMInspector.h */,
@@ -8744,7 +8738,6 @@
 				FE187A0D1C030D5C0038BBCA /* JITDivGenerator.h in Headers */,
 				0F46808214BA572D00BFE272 /* JITExceptions.h in Headers */,
 				0FB14E1F18124ACE009B6B4D /* JITInlineCacheGenerator.h in Headers */,
-				FE1BD02B1E721B4C00134BC9 /* StackTrace.h in Headers */,
 				86CC85A10EE79A4700288682 /* JITInlines.h in Headers */,
 				FE3A06BE1C11041200390FDD /* JITLeftShiftGenerator.h in Headers */,
 				79233C2B1D34715700C5A834 /* JITMathIC.h in Headers */,
@@ -10185,7 +10178,6 @@
 				0FC97F4118202119002C9B26 /* DFGWatchpointCollectionPhase.cpp in Sources */,
 				0FDB2CE7174830A2007B3C1B /* DFGWorklist.cpp in Sources */,
 				0FE050171AA9091100D33B33 /* DirectArguments.cpp in Sources */,
-				FE1BD02C1E721B5100134BC9 /* StackTrace.cpp in Sources */,
 				0FE050151AA9091100D33B33 /* DirectArgumentsOffset.cpp in Sources */,
 				0F2EBBAB1DEDF95000990369 /* DirectEvalCodeCache.cpp in Sources */,
 				14386A741DD69895008652C4 /* DirectEvalExecutable.cpp in Sources */,

Deleted: trunk/Source/_javascript_Core/tools/StackTrace.cpp (213701 => 213702)


--- trunk/Source/_javascript_Core/tools/StackTrace.cpp	2017-03-10 05:08:40 UTC (rev 213701)
+++ trunk/Source/_javascript_Core/tools/StackTrace.cpp	2017-03-10 05:18:28 UTC (rev 213702)
@@ -1,105 +0,0 @@
-/*
- * Copyright (C) 2017 Apple Inc. 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.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``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 INC. OR
- * 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.
- */
-
-#include "config.h"
-#include "StackTrace.h"
-
-#include <wtf/Assertions.h>
-
-#if OS(DARWIN) || (OS(LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__))
-#include <cxxabi.h>
-#include <dlfcn.h>
-#include <execinfo.h>
-#endif
-
-#if OS(DARWIN) || OS(LINUX)
-#  if PLATFORM(GTK)
-#    if defined(__GLIBC__) && !defined(__UCLIBC__)
-#      define USE_BACKTRACE_SYMBOLS 1
-#    endif
-#  else
-#    define USE_DLADDR 1
-#  endif
-#endif
-
-namespace JSC {
-
-ALWAYS_INLINE size_t StackTrace::instanceSize(int capacity)
-{
-    ASSERT(capacity >= 1);
-    return sizeof(StackTrace) + (capacity - 1) * sizeof(void*);
-}
-
-StackTrace* StackTrace::captureStackTrace(int maxFrames)
-{
-    maxFrames = std::max(1, maxFrames);
-    size_t sizeToAllocate = instanceSize(maxFrames);
-    StackTrace* trace = new (NotNull, fastMalloc(sizeToAllocate)) StackTrace();
-
-    static const int framesToSkip = 2;
-    int numberOfFrames = maxFrames + framesToSkip;
-    
-    WTFGetBacktrace(&trace->m_skippedFrame0, &numberOfFrames);
-    ASSERT(numberOfFrames > framesToSkip);
-    trace->m_size = numberOfFrames - framesToSkip;
-    trace->m_capacity = maxFrames;
-
-    return trace;
-}
-
-void StackTrace::dump(PrintStream& out) const
-{
-#if USE(BACKTRACE_SYMBOLS)
-    char** symbols = backtrace_symbols(m_stack, m_size);
-    if (!symbols)
-        return;
-#endif
-    
-    for (int i = 0; i < m_size; ++i) {
-        const char* mangledName = 0;
-        char* cxaDemangled = 0;
-#if USE(BACKTRACE_SYMBOLS)
-        mangledName = symbols[i];
-#elif USE(DLADDR)
-        Dl_info info;
-        if (dladdr(m_stack[i], &info) && info.dli_sname)
-            mangledName = info.dli_sname;
-        if (mangledName)
-            cxaDemangled = abi::__cxa_demangle(mangledName, 0, 0, 0);
-#endif
-        const int frameNumber = i + 1;
-        if (mangledName || cxaDemangled)
-            out.printf("%-3d %p %s\n", frameNumber, m_stack[i], cxaDemangled ? cxaDemangled : mangledName);
-        else
-            out.printf("%-3d %p\n", frameNumber, m_stack[i]);
-        free(cxaDemangled);
-    }
-    
-#if USE(BACKTRACE_SYMBOLS)
-    free(symbols);
-#endif
-}
-
-} // namespace JSC

Deleted: trunk/Source/_javascript_Core/tools/StackTrace.h (213701 => 213702)


--- trunk/Source/_javascript_Core/tools/StackTrace.h	2017-03-10 05:08:40 UTC (rev 213701)
+++ trunk/Source/_javascript_Core/tools/StackTrace.h	2017-03-10 05:18:28 UTC (rev 213702)
@@ -1,63 +0,0 @@
-/*
- * Copyright (C) 2017 Apple Inc. 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.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``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 INC. OR
- * 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.
- */
-
-#pragma once
-
-#include <wtf/PrintStream.h>
-
-namespace JSC {
-
-class StackTrace {
-    WTF_MAKE_FAST_ALLOCATED;
-public:
-    static StackTrace* captureStackTrace(int maxFrames);
-
-    int size() const { return m_size; }
-
-    void dump(PrintStream&) const;
-
-private:
-    inline static size_t instanceSize(int capacity);
-
-    StackTrace() { }
-
-    // We structure the top fields this way because the underlying stack capture
-    // facility will capture from the top of the stack, and we'll need to skip the
-    // top 2 frame which is of no interest. Setting up the fields layout this way
-    // allows us to capture the stack in place and minimize space wastage.
-    union {
-        struct {
-            int m_size { 0 };
-            int m_capacity;
-        };
-        struct {
-            void* m_skippedFrame0;
-            void* m_skippedFrame1;
-        };
-    };
-    void* m_stack[1];
-};
-
-} // namespace JSC
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to