--- a/hotspot/src/share/vm/runtime/hpi.hpp Sun Mar 29 18:19:05 2009 -0400
+++ b/hotspot/src/share/vm/runtime/hpi.hpp Wed Apr 01 16:38:01 2009 -0400
@@ -90,7 +90,7 @@
static inline struct protoent* get_proto_by_name(char* name);
// HPI_LibraryInterface
- static inline void dll_build_name(char *buf, int buf_len, char* path,
+ static inline void dll_build_name(char *buf, int buf_len, const char* path,
const char *name);
static inline void* dll_load(const char *name, char *ebuf, int ebuflen);
static inline void dll_unload(void *lib);
@@ -137,7 +137,15 @@
return result; \
}
-
+#define VM_HPIDECL_VOID(name, names, func, arg_type, arg_print, arg) \
+ inline void hpi::name arg_type { \
+ if (TraceHPI) { \
+ tty->print("hpi::" names "("); \
+ tty->print arg_print; \
+ tty->print(") = "); \
+ } \
+ func arg; \
+ }
#define HPIDECL_VOID(name, names, intf, func, arg_type, arg_print, arg) \
inline void hpi::name arg_type { \
@@ -197,11 +205,11 @@
(fd, size));
// HPI_LibraryInterface
-HPIDECL_VOID(dll_build_name, "dll_build_name", _library, BuildLibName,
- (char *buf, int buf_len, char *path, const char *name),
- ("buf = %p, buflen = %d, path = %s, name = %s",
- buf, buf_len, path, name),
- (buf, buf_len, path, name));
+VM_HPIDECL_VOID(dll_build_name, "dll_build_name", os::dll_build_name,
+ (char *buf, int buf_len, const char *path, const char *name),
+ ("buf = %p, buflen = %d, path = %s, name = %s",
+ buf, buf_len, path, name),
+ (buf, buf_len, path, name));
VM_HPIDECL(dll_load, "dll_load", os::dll_load,
void *, "(void *)%p",