changeset 1623:308c172cd230

2009-07-03 Gary Benson <gbenson@redhat.com> * ports/hotspot/src/share/vm/shark/sharkEntry.hpp (SharkEntry::print_statistics): Removed. * ports/hotspot/src/share/vm/shark/sharkEntry.cpp: Removed. * ports/hotspot/src/share/vm/shark/sharkCompiler.cpp (SharkCompiler::compile_method): Save location of native code across the call to ciEnv::register_method (which frees the buffer blob it's in), and inline what was SharkEntry::print_statistics. * ports/hotspot/src/share/vm/includeDB_shark: Updated.
author Gary Benson <gbenson@redhat.com>
date Fri, 03 Jul 2009 11:52:45 +0100
parents 9247751a966e
children 051f9a48387c
files ChangeLog ports/hotspot/src/share/vm/includeDB_shark ports/hotspot/src/share/vm/shark/sharkCompiler.cpp ports/hotspot/src/share/vm/shark/sharkEntry.cpp ports/hotspot/src/share/vm/shark/sharkEntry.hpp
diffstat 5 files changed, 22 insertions(+), 49 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Jun 26 04:51:17 2009 -0400
+++ b/ChangeLog	Fri Jul 03 11:52:45 2009 +0100
@@ -1,3 +1,16 @@
+2009-07-03  Gary Benson  <gbenson@redhat.com>
+
+	* ports/hotspot/src/share/vm/shark/sharkEntry.hpp
+	(SharkEntry::print_statistics): Removed.
+	* ports/hotspot/src/share/vm/shark/sharkEntry.cpp: Removed.
+
+	* ports/hotspot/src/share/vm/shark/sharkCompiler.cpp
+	(SharkCompiler::compile_method): Save location of native code
+	across the call to ciEnv::register_method (which frees the buffer
+	blob it's in), and inline what was SharkEntry::print_statistics.
+
+	* ports/hotspot/src/share/vm/includeDB_shark: Updated.
+
 2009-06-26  Gary Benson  <gbenson@redhat.com>
 
 	* ports/hotspot/src/share/vm/shark/sharkCompiler.cpp
--- a/ports/hotspot/src/share/vm/includeDB_shark	Fri Jun 26 04:51:17 2009 -0400
+++ b/ports/hotspot/src/share/vm/includeDB_shark	Fri Jul 03 11:52:45 2009 +0100
@@ -167,8 +167,6 @@
 sharkConstant.hpp                       sharkBuilder.hpp
 sharkConstant.hpp                       sharkValue.hpp
 
-sharkEntry.cpp                          sharkEntry.hpp
-
 sharkEntry.hpp                          llvmHeaders.hpp
 
 sharkFunction.cpp                       allocation.hpp
--- a/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp	Fri Jun 26 04:51:17 2009 -0400
+++ b/ports/hotspot/src/share/vm/shark/sharkCompiler.cpp	Fri Jul 03 11:52:45 2009 +0100
@@ -166,12 +166,12 @@
   entry->set_entry_point(
     (ZeroEntry::method_entry_t)
       execution_engine()->getPointerToFunction(function));
+  address code_start = entry->code_start();
+  address code_limit = entry->code_limit();
 
   // Register generated code for profiling, etc
-  if (JvmtiExport::should_post_dynamic_code_generated()) {
-    JvmtiExport::post_dynamic_code_generated(
-      name, entry->code_start(), entry->code_limit());
-  }
+  if (JvmtiExport::should_post_dynamic_code_generated())
+    JvmtiExport::post_dynamic_code_generated(name, code_start, code_limit);
   
   // Install the method into the VM
   CodeOffsets offsets;
@@ -198,8 +198,11 @@
                        false);
 
   // Print statistics, if requested
-  if (SharkTraceInstalls)
-    entry->print_statistics(name);
+  if (SharkTraceInstalls) {
+    tty->print_cr(
+      " [%p-%p): %s (%d bytes code)",
+      code_start, code_limit, name, code_limit - code_start);
+  }
 }
 
 const char* SharkCompiler::methodname(const ciMethod* target)
--- a/ports/hotspot/src/share/vm/shark/sharkEntry.cpp	Fri Jun 26 04:51:17 2009 -0400
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,38 +0,0 @@
-/*
- * Copyright 1999-2007 Sun Microsystems, Inc.  All Rights Reserved.
- * Copyright 2008, 2009 Red Hat, Inc.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
- *
- */
-
-#include "incls/_precompiled.incl"
-#include "incls/_sharkEntry.cpp.incl"
-
-#ifndef PRODUCT
-void SharkEntry::print_statistics(const char* name) const
-{
-  address start = code_start();
-  address limit = code_limit();
-
-  tty->print_cr(
-    " [%p-%p): %s (%d bytes code)", start, limit, name, limit - start);
-}
-#endif // !PRODUCT
--- a/ports/hotspot/src/share/vm/shark/sharkEntry.hpp	Fri Jun 26 04:51:17 2009 -0400
+++ b/ports/hotspot/src/share/vm/shark/sharkEntry.hpp	Fri Jul 03 11:52:45 2009 +0100
@@ -43,7 +43,4 @@
   {
     _code_limit = code_limit;
   }
-  
- public:
-  void print_statistics(const char* name) const PRODUCT_RETURN;
 };