< prev index next >

src/share/vm/prims/jvmtiEnv.cpp

Print this page




  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "classfile/classLoaderExt.hpp"
  27 #include "classfile/systemDictionary.hpp"
  28 #include "classfile/vmSymbols.hpp"
  29 #include "interpreter/bytecodeStream.hpp"
  30 #include "interpreter/interpreter.hpp"
  31 #include "jvmtifiles/jvmtiEnv.hpp"

  32 #include "memory/resourceArea.hpp"
  33 #include "memory/universe.inline.hpp"
  34 #include "oops/instanceKlass.hpp"
  35 #include "oops/objArrayOop.inline.hpp"
  36 #include "oops/oop.inline.hpp"
  37 #include "prims/jniCheck.hpp"
  38 #include "prims/jvm_misc.hpp"
  39 #include "prims/jvmtiAgentThread.hpp"
  40 #include "prims/jvmtiClassFileReconstituter.hpp"
  41 #include "prims/jvmtiCodeBlobEvents.hpp"
  42 #include "prims/jvmtiExtensions.hpp"
  43 #include "prims/jvmtiGetLoadedClasses.hpp"
  44 #include "prims/jvmtiImpl.hpp"
  45 #include "prims/jvmtiManageCapabilities.hpp"
  46 #include "prims/jvmtiRawMonitor.hpp"
  47 #include "prims/jvmtiRedefineClasses.hpp"
  48 #include "prims/jvmtiTagMap.hpp"
  49 #include "prims/jvmtiThreadState.inline.hpp"
  50 #include "prims/jvmtiUtil.hpp"
  51 #include "runtime/arguments.hpp"


 611   size_t len = strlen(name) + 1;
 612   jvmtiError err = allocate(len, (unsigned char**)name_ptr);
 613   if (err == JVMTI_ERROR_NONE) {
 614     memcpy(*name_ptr, name, len);
 615   }
 616   return err;
 617 } /* end GetErrorName */
 618 
 619 
 620 jvmtiError
 621 JvmtiEnv::SetVerboseFlag(jvmtiVerboseFlag flag, jboolean value) {
 622   switch (flag) {
 623   case JVMTI_VERBOSE_OTHER:
 624     // ignore
 625     break;
 626   case JVMTI_VERBOSE_CLASS:
 627     TraceClassLoading = value != 0;
 628     TraceClassUnloading = value != 0;
 629     break;
 630   case JVMTI_VERBOSE_GC:
 631     PrintGC = value != 0;




 632     break;
 633   case JVMTI_VERBOSE_JNI:
 634     PrintJNIResolving = value != 0;
 635     break;
 636   default:
 637     return JVMTI_ERROR_ILLEGAL_ARGUMENT;
 638   };
 639   return JVMTI_ERROR_NONE;
 640 } /* end SetVerboseFlag */
 641 
 642 
 643 // format_ptr - pre-checked for NULL
 644 jvmtiError
 645 JvmtiEnv::GetJLocationFormat(jvmtiJlocationFormat* format_ptr) {
 646   *format_ptr = JVMTI_JLOCATION_JVMBCI;
 647   return JVMTI_ERROR_NONE;
 648 } /* end GetJLocationFormat */
 649 
 650   //
 651   // Thread functions




  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "classfile/classLoaderExt.hpp"
  27 #include "classfile/systemDictionary.hpp"
  28 #include "classfile/vmSymbols.hpp"
  29 #include "interpreter/bytecodeStream.hpp"
  30 #include "interpreter/interpreter.hpp"
  31 #include "jvmtifiles/jvmtiEnv.hpp"
  32 #include "logging/logConfiguration.hpp"
  33 #include "memory/resourceArea.hpp"
  34 #include "memory/universe.inline.hpp"
  35 #include "oops/instanceKlass.hpp"
  36 #include "oops/objArrayOop.inline.hpp"
  37 #include "oops/oop.inline.hpp"
  38 #include "prims/jniCheck.hpp"
  39 #include "prims/jvm_misc.hpp"
  40 #include "prims/jvmtiAgentThread.hpp"
  41 #include "prims/jvmtiClassFileReconstituter.hpp"
  42 #include "prims/jvmtiCodeBlobEvents.hpp"
  43 #include "prims/jvmtiExtensions.hpp"
  44 #include "prims/jvmtiGetLoadedClasses.hpp"
  45 #include "prims/jvmtiImpl.hpp"
  46 #include "prims/jvmtiManageCapabilities.hpp"
  47 #include "prims/jvmtiRawMonitor.hpp"
  48 #include "prims/jvmtiRedefineClasses.hpp"
  49 #include "prims/jvmtiTagMap.hpp"
  50 #include "prims/jvmtiThreadState.inline.hpp"
  51 #include "prims/jvmtiUtil.hpp"
  52 #include "runtime/arguments.hpp"


 612   size_t len = strlen(name) + 1;
 613   jvmtiError err = allocate(len, (unsigned char**)name_ptr);
 614   if (err == JVMTI_ERROR_NONE) {
 615     memcpy(*name_ptr, name, len);
 616   }
 617   return err;
 618 } /* end GetErrorName */
 619 
 620 
 621 jvmtiError
 622 JvmtiEnv::SetVerboseFlag(jvmtiVerboseFlag flag, jboolean value) {
 623   switch (flag) {
 624   case JVMTI_VERBOSE_OTHER:
 625     // ignore
 626     break;
 627   case JVMTI_VERBOSE_CLASS:
 628     TraceClassLoading = value != 0;
 629     TraceClassUnloading = value != 0;
 630     break;
 631   case JVMTI_VERBOSE_GC:
 632     if (value == 0) {
 633       LogConfiguration::parse_log_arguments("stdout", "gc", NULL, NULL, NULL);
 634     } else {
 635       LogConfiguration::parse_log_arguments("stdout", "gc=off", NULL, NULL, NULL);
 636     }
 637     break;
 638   case JVMTI_VERBOSE_JNI:
 639     PrintJNIResolving = value != 0;
 640     break;
 641   default:
 642     return JVMTI_ERROR_ILLEGAL_ARGUMENT;
 643   };
 644   return JVMTI_ERROR_NONE;
 645 } /* end SetVerboseFlag */
 646 
 647 
 648 // format_ptr - pre-checked for NULL
 649 jvmtiError
 650 JvmtiEnv::GetJLocationFormat(jvmtiJlocationFormat* format_ptr) {
 651   *format_ptr = JVMTI_JLOCATION_JVMBCI;
 652   return JVMTI_ERROR_NONE;
 653 } /* end GetJLocationFormat */
 654 
 655   //
 656   // Thread functions


< prev index next >