[vmkit-commits] [vmkit] r86473 - in /vmkit/trunk: include/mvm/Threads/Thread.h lib/N3/VMCore/BackTrace.cpp lib/N3/VMCore/CLIJit.h

Nicolas Geoffray nicolas.geoffray at lip6.fr
Sun Nov 8 07:51:42 PST 2009


Author: geoffray
Date: Sun Nov  8 09:51:41 2009
New Revision: 86473

URL: http://llvm.org/viewvc/llvm-project?rev=86473&view=rev
Log:
Remove getBacktrace function.


Removed:
    vmkit/trunk/lib/N3/VMCore/BackTrace.cpp
Modified:
    vmkit/trunk/include/mvm/Threads/Thread.h
    vmkit/trunk/lib/N3/VMCore/CLIJit.h

Modified: vmkit/trunk/include/mvm/Threads/Thread.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/include/mvm/Threads/Thread.h?rev=86473&r1=86472&r2=86473&view=diff

==============================================================================
--- vmkit/trunk/include/mvm/Threads/Thread.h (original)
+++ vmkit/trunk/include/mvm/Threads/Thread.h Sun Nov  8 09:51:41 2009
@@ -324,18 +324,6 @@
   VirtualMachine* stoppingService;  
 #endif
 
-  /// getBacktrace - Return the back trace of this thread.
-  ///
-  int getBacktrace(void** stack, int size) {
-    void** addr = (void**)__builtin_frame_address(0);
-    int cpt = 0;
-    while (addr && cpt < size && addr < baseSP && addr < addr[0]) {
-      addr = (void**)addr[0];
-      stack[cpt++] = (void**)FRAME_IP(addr);
-    }
-    return cpt;
-  }
-
   /// printBacktrace - Print the backtrace.
   ///
   void printBacktrace();

Removed: vmkit/trunk/lib/N3/VMCore/BackTrace.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/N3/VMCore/BackTrace.cpp?rev=86472&view=auto

==============================================================================
--- vmkit/trunk/lib/N3/VMCore/BackTrace.cpp (original)
+++ vmkit/trunk/lib/N3/VMCore/BackTrace.cpp (removed)
@@ -1,40 +0,0 @@
-//===------------ Backtrace.cpp - Backtrace utilities ---------------------===//
-//
-//                               N3
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-
-#include <cstdio>
-#include <dlfcn.h>
-
-#include "mvm/JIT.h"
-#include "mvm/Object.h"
-
-#include "Assembly.h"
-#include "CLIJit.h"
-#include "N3.h"
-#include "N3ModuleProvider.h"
-#include "VMClass.h"
-#include "VMThread.h"
-
-using namespace n3;
-
-// Do a backtrace until we know when we cross native -> CLI boundaries.
-void CLIJit::printBacktrace() {
-  int* ips[100];
-  int real_size = mvm::Thread::get()->getBacktrace((void**)(void*)ips, 100);
-  int n = 0;
-  while (n < real_size) {
-    Dl_info info;
-    int res = dladdr(ips[n++], &info);
-    if (res != 0) {
-      fprintf(stderr, "; %p in %s\n",  (void*)ips[n - 1], info.dli_sname);
-    } else {
-      fprintf(stderr, "; %p in .Net method\n", (void*)ips[n - 1]);
-    }
-  }
-}

Modified: vmkit/trunk/lib/N3/VMCore/CLIJit.h
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/N3/VMCore/CLIJit.h?rev=86473&r1=86472&r2=86473&view=diff

==============================================================================
--- vmkit/trunk/lib/N3/VMCore/CLIJit.h (original)
+++ vmkit/trunk/lib/N3/VMCore/CLIJit.h Sun Nov  8 09:51:41 2009
@@ -203,8 +203,6 @@
   
   static llvm::Function* virtualLookupLLVM;
 
-  static void printBacktrace();
-  
   llvm::Instruction* lowerMathOps(VMMethod* meth, 
                                   std::vector<llvm::Value*>& args);
 





More information about the vmkit-commits mailing list