# HG changeset patch # User Morris Meyer # Date 1372707987 14400 # Node ID b0b368d38b40ce7f950e8a9a214ce30ea5e090f2 # Parent e43bb3295475537561d6964b86b58d62246dbee2 CR-1032 - change ExternalCompilationResult kernel -> entryPoint diff -r e43bb3295475 -r b0b368d38b40 graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/ExternalCompilationResult.java --- a/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/ExternalCompilationResult.java Mon Jul 01 11:47:01 2013 +0200 +++ b/graal/com.oracle.graal.api.code/src/com/oracle/graal/api/code/ExternalCompilationResult.java Mon Jul 01 15:46:27 2013 -0400 @@ -22,21 +22,40 @@ */ package com.oracle.graal.api.code; +/** + * Represents the output from compiling a method generated by graal, but executing + * in a memory and computational subsystem outside the graal host system. + * + * Output may include the compiled machine code, associated + * data and references, relocation information, deoptimization information, + * as this result is generated from a structure graph on the graal host system. + */ public class ExternalCompilationResult extends CompilationResult { - private static final long serialVersionUID = 1L; + private static final long serialVersionUID = 1L; - private long kernel; + /** + * Address of the point of entry to the external compilation result. + */ + private long entryPoint; public ExternalCompilationResult() { super(); } - public void setKernel(long k) { - kernel = k; + /** + * Set the address for the point of entry to the external compilation result. + * @param addr The address of the entry point. + */ + public void setEntryPoint(long addr) { + entryPoint = addr; } - public long getKernel() { - return kernel; + /** + * Return the address for the point of entry to the external compilation result. + * @return address value + */ + public long getEntryPoint() { + return entryPoint; } } diff -r e43bb3295475 -r b0b368d38b40 graal/com.oracle.graal.compiler.ptx/src/com/oracle/graal/compiler/ptx/PTXTargetMethodAssembler.java --- a/graal/com.oracle.graal.compiler.ptx/src/com/oracle/graal/compiler/ptx/PTXTargetMethodAssembler.java Mon Jul 01 11:47:01 2013 +0200 +++ b/graal/com.oracle.graal.compiler.ptx/src/com/oracle/graal/compiler/ptx/PTXTargetMethodAssembler.java Mon Jul 01 15:46:27 2013 -0400 @@ -52,7 +52,7 @@ try { if (validDevice) { long kernel = toGPU.generateKernel(graalCompile.getTargetCode(), method.getName()); - graalCompile.setKernel(kernel); + graalCompile.setEntryPoint(kernel); } } catch (Throwable th) { th.printStackTrace(); diff -r e43bb3295475 -r b0b368d38b40 src/gpu/ptx/gpu_ptx.cpp --- a/src/gpu/ptx/gpu_ptx.cpp Mon Jul 01 11:47:01 2013 +0200 +++ b/src/gpu/ptx/gpu_ptx.cpp Mon Jul 01 15:46:27 2013 -0400 @@ -164,7 +164,9 @@ gridX, gridY, gridZ, blockX, blockY, blockZ, 0, NULL, NULL, NULL); - tty->print_cr("gpu_ptx::_cuda_cu_launch_kernel(%x): %d", kernel, status); + if (TraceWarpLoading) { + tty->print_cr("gpu_ptx::_cuda_cu_launch_kernel(%x): %d", kernel, status); + } return status == 0; // CUDA_SUCCESS } diff -r e43bb3295475 -r b0b368d38b40 src/share/vm/graal/graalCompilerToVM.cpp --- a/src/share/vm/graal/graalCompilerToVM.cpp Mon Jul 01 11:47:01 2013 +0200 +++ b/src/share/vm/graal/graalCompilerToVM.cpp Mon Jul 01 15:46:27 2013 -0400 @@ -971,8 +971,10 @@ HotSpotInstalledCode::set_codeBlob(installed_code_handle, (jlong) cb); oop comp_result = HotSpotCompiledCode::comp(compiled_code_handle); if (comp_result->is_a(ExternalCompilationResult::klass())) { - tty->print_cr("installCode0: ExternalCompilationResult"); - HotSpotInstalledCode::set_start(installed_code_handle, ExternalCompilationResult::kernel(comp_result)); + if (TraceWarpLoading) { + tty->print_cr("installCode0: ExternalCompilationResult"); + } + HotSpotInstalledCode::set_start(installed_code_handle, ExternalCompilationResult::entryPoint(comp_result)); } else { HotSpotInstalledCode::set_start(installed_code_handle, (jlong) cb->code_begin()); } diff -r e43bb3295475 -r b0b368d38b40 src/share/vm/graal/graalJavaAccess.hpp --- a/src/share/vm/graal/graalJavaAccess.hpp Mon Jul 01 11:47:01 2013 +0200 +++ b/src/share/vm/graal/graalJavaAccess.hpp Mon Jul 01 15:46:27 2013 -0400 @@ -112,7 +112,7 @@ oop_field(ExceptionHandler, catchType, "Lcom/oracle/graal/api/meta/JavaType;") \ end_class \ start_class(ExternalCompilationResult) \ - long_field(ExternalCompilationResult, kernel) \ + long_field(ExternalCompilationResult, entryPoint) \ end_class \ start_class(CompilationResult) \ int_field(CompilationResult, frameSize) \