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/systemDictionary.hpp"
27 #include "compiler/compileLog.hpp"
28 #include "oops/objArrayKlass.hpp"
29 #include "opto/addnode.hpp"
30 #include "opto/memnode.hpp"
31 #include "opto/mulnode.hpp"
32 #include "opto/parse.hpp"
33 #include "opto/rootnode.hpp"
34 #include "opto/runtime.hpp"
35 #include "runtime/sharedRuntime.hpp"
36
37 //------------------------------make_dtrace_method_entry_exit ----------------
38 // Dtrace -- record entry or exit of a method if compiled with dtrace support
39 void GraphKit::make_dtrace_method_entry_exit(ciMethod* method, bool is_entry) {
40 const TypeFunc *call_type = OptoRuntime::dtrace_method_entry_exit_Type();
41 address call_address = is_entry ? CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_entry) :
42 CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_exit);
43 const char *call_name = is_entry ? "dtrace_method_entry" : "dtrace_method_exit";
44
45 // Get base of thread-local storage area
46 Node* thread = _gvn.transform( new (C) ThreadLocalNode() );
47
48 // Get method
49 const TypePtr* method_type = TypeMetadataPtr::make(method);
50 Node *method_node = _gvn.transform( ConNode::make(C, method_type) );
51
52 kill_dead_locals();
53
54 // For some reason, this call reads only raw memory.
|
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/systemDictionary.hpp"
27 #include "compiler/compileLog.hpp"
28 #include "oops/objArrayKlass.hpp"
29 #include "opto/addnode.hpp"
30 #include "opto/memnode.hpp"
31 #include "opto/mulnode.hpp"
32 #include "opto/parse.hpp"
33 #include "opto/rootnode.hpp"
34 #include "opto/runtime.hpp"
35 #include "opto/threadnode.hpp"
36 #include "runtime/sharedRuntime.hpp"
37
38 //------------------------------make_dtrace_method_entry_exit ----------------
39 // Dtrace -- record entry or exit of a method if compiled with dtrace support
40 void GraphKit::make_dtrace_method_entry_exit(ciMethod* method, bool is_entry) {
41 const TypeFunc *call_type = OptoRuntime::dtrace_method_entry_exit_Type();
42 address call_address = is_entry ? CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_entry) :
43 CAST_FROM_FN_PTR(address, SharedRuntime::dtrace_method_exit);
44 const char *call_name = is_entry ? "dtrace_method_entry" : "dtrace_method_exit";
45
46 // Get base of thread-local storage area
47 Node* thread = _gvn.transform( new (C) ThreadLocalNode() );
48
49 // Get method
50 const TypePtr* method_type = TypeMetadataPtr::make(method);
51 Node *method_node = _gvn.transform( ConNode::make(C, method_type) );
52
53 kill_dead_locals();
54
55 // For some reason, this call reads only raw memory.
|