Mercurial > hg > graal-jvmci-8
diff src/share/vm/prims/jvmtiEnv.cpp @ 2044:06f017f7daa7
Merge.
author | Thomas Wuerthinger <wuerthinger@ssw.jku.at> |
---|---|
date | Fri, 07 Jan 2011 18:18:08 +0100 |
parents | 09b4dd4f152b |
children | b1a2afa37ec4 |
line wrap: on
line diff
--- a/src/share/vm/prims/jvmtiEnv.cpp Wed Dec 29 20:06:41 2010 +0100 +++ b/src/share/vm/prims/jvmtiEnv.cpp Fri Jan 07 18:18:08 2011 +0100 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2009, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -22,9 +22,53 @@ * */ - -# include "incls/_precompiled.incl" -# include "incls/_jvmtiEnv.cpp.incl" +#include "precompiled.hpp" +#include "classfile/systemDictionary.hpp" +#include "classfile/vmSymbols.hpp" +#include "interpreter/bytecodeStream.hpp" +#include "interpreter/interpreter.hpp" +#include "jvmtifiles/jvmtiEnv.hpp" +#include "memory/resourceArea.hpp" +#include "memory/universe.inline.hpp" +#include "oops/cpCacheOop.hpp" +#include "oops/instanceKlass.hpp" +#include "prims/jniCheck.hpp" +#include "prims/jvm_misc.hpp" +#include "prims/jvmtiAgentThread.hpp" +#include "prims/jvmtiClassFileReconstituter.hpp" +#include "prims/jvmtiCodeBlobEvents.hpp" +#include "prims/jvmtiExtensions.hpp" +#include "prims/jvmtiGetLoadedClasses.hpp" +#include "prims/jvmtiImpl.hpp" +#include "prims/jvmtiManageCapabilities.hpp" +#include "prims/jvmtiRawMonitor.hpp" +#include "prims/jvmtiRedefineClasses.hpp" +#include "prims/jvmtiTagMap.hpp" +#include "prims/jvmtiThreadState.inline.hpp" +#include "prims/jvmtiUtil.hpp" +#include "runtime/arguments.hpp" +#include "runtime/deoptimization.hpp" +#include "runtime/interfaceSupport.hpp" +#include "runtime/javaCalls.hpp" +#include "runtime/jfieldIDWorkaround.hpp" +#include "runtime/osThread.hpp" +#include "runtime/reflectionUtils.hpp" +#include "runtime/signature.hpp" +#include "runtime/vframe.hpp" +#include "runtime/vmThread.hpp" +#include "services/threadService.hpp" +#include "utilities/exceptions.hpp" +#include "utilities/preserveException.hpp" +#ifdef TARGET_OS_FAMILY_linux +# include "thread_linux.inline.hpp" +#endif +#ifdef TARGET_OS_FAMILY_solaris +# include "thread_solaris.inline.hpp" +#endif +#ifdef TARGET_OS_FAMILY_windows +# include "thread_windows.inline.hpp" +#endif + #define FIXLATER 0 // REMOVE this when completed. @@ -1752,6 +1796,29 @@ } } /* end GetLocalObject */ +// Threads_lock NOT held, java_thread not protected by lock +// java_thread - pre-checked +// java_thread - unchecked +// depth - pre-checked as non-negative +// value - pre-checked for NULL +jvmtiError +JvmtiEnv::GetLocalInstance(JavaThread* java_thread, jint depth, jobject* value){ + JavaThread* current_thread = JavaThread::current(); + // rm object is created to clean up the javaVFrame created in + // doit_prologue(), but after doit() is finished with it. + ResourceMark rm(current_thread); + + VM_GetReceiver op(java_thread, current_thread, depth); + VMThread::execute(&op); + jvmtiError err = op.result(); + if (err != JVMTI_ERROR_NONE) { + return err; + } else { + *value = op.value().l; + return JVMTI_ERROR_NONE; + } +} /* end GetLocalInstance */ + // Threads_lock NOT held, java_thread not protected by lock // java_thread - pre-checked