diff -Nru openjdk.orig/hotspot/make/linux/makefiles/dtrace.make openjdk/hotspot/make/linux/makefiles/dtrace.make
--- openjdk.orig/hotspot/make/linux/makefiles/dtrace.make	2010-06-21 22:12:13.000000000 +0100
+++ openjdk/hotspot/make/linux/makefiles/dtrace.make	2010-08-27 22:37:45.253819793 +0100
@@ -25,3 +25,7 @@
 # Linux does not build jvm_db
 LIBJVM_DB =
 
+# But it does have a Systemtap dtrace compatible sys/sdt.h
+CFLAGS += -DDTRACE_ENABLED
+
+# It doesn't support HAVE_DTRACE_H though.
diff -Nru openjdk.orig/hotspot/src/share/vm/prims/jni.cpp openjdk/hotspot/src/share/vm/prims/jni.cpp
--- openjdk.orig/hotspot/src/share/vm/prims/jni.cpp	2010-06-21 22:12:20.000000000 +0100
+++ openjdk/hotspot/src/share/vm/prims/jni.cpp	2010-08-27 22:37:45.261818795 +0100
@@ -1753,10 +1753,7 @@
 JNI_QUICK_ENTRY(void, jni_Set##Result##Field(JNIEnv *env, jobject obj, jfieldID fieldID, Argument value)) \
   JNIWrapper("Set" XSTR(Result) "Field"); \
 \
-  HS_DTRACE_PROBE_CDECL_N(hotspot_jni, Set##Result##Field__entry, \
-    ( JNIEnv*, jobject, jfieldID FP_SELECT_##Result(COMMA Argument,/*empty*/) ) ); \
-  HS_DTRACE_PROBE_N(hotspot_jni, Set##Result##Field__entry, \
-    ( env, obj, fieldID FP_SELECT_##Result(COMMA value,/*empty*/) ) ); \
+  FP_SELECT_##Result(DTRACE_PROBE4(hotspot_jni, Set##Result##Field__entry, env, obj, fieldID, value),DTRACE_PROBE3(hotspot_jni, Set##Result##Field__entry, env, obj, fieldID)); \
 \
   oop o = JNIHandles::resolve_non_null(obj); \
   klassOop k = o->klass(); \
@@ -1930,10 +1927,7 @@
 \
 JNI_ENTRY(void, jni_SetStatic##Result##Field(JNIEnv *env, jclass clazz, jfieldID fieldID, Argument value)) \
   JNIWrapper("SetStatic" XSTR(Result) "Field"); \
-  HS_DTRACE_PROBE_CDECL_N(hotspot_jni, SetStatic##Result##Field__entry,\
-    ( JNIEnv*, jclass, jfieldID FP_SELECT_##Result(COMMA Argument,/*empty*/) ) ); \
-  HS_DTRACE_PROBE_N(hotspot_jni, SetStatic##Result##Field__entry, \
-    ( env, clazz, fieldID FP_SELECT_##Result(COMMA value,/*empty*/) ) ); \
+  FP_SELECT_##Result(DTRACE_PROBE4(hotspot_jni, SetStatic##Result##Field__entry, env, clazz, fieldID, value),DTRACE_PROBE3(hotspot_jni, SetStatic##Result##Field__entry, env, clazz, fieldID)); \
 \
   JNIid* id = jfieldIDWorkaround::from_static_jfieldID(fieldID); \
   assert(id->is_static_field_id(), "invalid static field id"); \
diff -Nru openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp openjdk/hotspot/src/share/vm/runtime/arguments.cpp
--- openjdk.orig/hotspot/src/share/vm/runtime/arguments.cpp	2010-08-27 20:30:51.000000000 +0100
+++ openjdk/hotspot/src/share/vm/runtime/arguments.cpp	2010-08-27 22:37:45.261818795 +0100
@@ -2460,16 +2460,16 @@
       FLAG_SET_CMDLINE(bool, DisplayVMOutputToStderr, false);
       FLAG_SET_CMDLINE(bool, DisplayVMOutputToStdout, true);
     } else if (match_option(option, "-XX:+ExtendedDTraceProbes", &tail)) {
-#ifdef SOLARIS
+#ifdef DTRACE_ENABLED
       FLAG_SET_CMDLINE(bool, ExtendedDTraceProbes, true);
       FLAG_SET_CMDLINE(bool, DTraceMethodProbes, true);
       FLAG_SET_CMDLINE(bool, DTraceAllocProbes, true);
       FLAG_SET_CMDLINE(bool, DTraceMonitorProbes, true);
-#else // ndef SOLARIS
+#else // ndef DTRACE_ENABLED
       jio_fprintf(defaultStream::error_stream(),
-                  "ExtendedDTraceProbes flag is only applicable on Solaris\n");
+                  "ExtendedDTraceProbes flag is only applicable on dtrace enabled builds\n");
       return JNI_EINVAL;
-#endif // ndef SOLARIS
+#endif // ndef DTRACE_ENABLED
 #ifdef ASSERT
     } else if (match_option(option, "-XX:+FullGCALot", &tail)) {
       FLAG_SET_CMDLINE(bool, FullGCALot, true);
diff -Nru openjdk.orig/hotspot/src/share/vm/utilities/dtrace.hpp openjdk/hotspot/src/share/vm/utilities/dtrace.hpp
--- openjdk.orig/hotspot/src/share/vm/utilities/dtrace.hpp	2010-08-27 20:30:52.000000000 +0100
+++ openjdk/hotspot/src/share/vm/utilities/dtrace.hpp	2010-08-27 22:38:19.569540300 +0100
@@ -1,5 +1,6 @@
 /*
  * Copyright (c) 2005, 2007, Oracle and/or its affiliates. All rights reserved.
+ * Copyright 2009 Red Hat, Inc.
  * 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,7 +23,7 @@
  *
  */
 
-#if defined(SOLARIS) && defined(DTRACE_ENABLED)
+#if defined(DTRACE_ENABLED)
 
 #include <sys/sdt.h>
 
@@ -33,7 +34,7 @@
 #define HS_DTRACE_WORKAROUND_TAIL_CALL_BUG() \
   do { volatile size_t dtrace_workaround_tail_call_bug = 1; } while (0)
 
-#else // ndef SOLARIS || ndef DTRACE_ENABLED
+#else // ndef DTRACE_ENABLED
 
 #define DTRACE_ONLY(x)
 #define NOT_DTRACE(x) x
@@ -44,11 +45,18 @@
 #define DTRACE_PROBE3(a,b,c,d,e) {;}
 #define DTRACE_PROBE4(a,b,c,d,e,f) {;}
 #define DTRACE_PROBE5(a,b,c,d,e,f,g) {;}
+#define DTRACE_PROBE6(a,b,c,d,e,f,g,h) {;}
+#define DTRACE_PROBE7(a,b,c,d,e,f,g,h,i) {;}
+#define DTRACE_PROBE8(a,b,c,d,e,f,g,h,i,j) {;}
+#define DTRACE_PROBE9(a,b,c,d,e,f,g,h,i,j,k) {;}
+#define DTRACE_PROBE10(a,b,c,d,e,f,g,h,i,j,k,l) {;}
 
 #define HS_DTRACE_WORKAROUND_TAIL_CALL_BUG()
 
 #endif
 
+#if defined(SOLARIS)
+// Solaris dtrace needs actual extern function decls.
 #define HS_DTRACE_PROBE_FN(provider,name)\
   __dtrace_##provider##___##name
 
@@ -56,6 +64,11 @@
   DTRACE_ONLY(extern "C" void HS_DTRACE_PROBE_FN(provider,name) args)
 #define HS_DTRACE_PROBE_CDECL_N(provider,name,args) \
   DTRACE_ONLY(extern void HS_DTRACE_PROBE_FN(provider,name) args)
+#else
+// Systemtap dtrace compatible probes on GNU/Linux don't.
+#define HS_DTRACE_PROBE_DECL_N(provider,name,args)
+#define HS_DTRACE_PROBE_CDECL_N(provider,name,args)
+#endif 
 
 /* Dtrace probe declarations */
 #define HS_DTRACE_PROBE_DECL(provider,name) \
@@ -94,6 +107,8 @@
     uintptr_t,uintptr_t,uintptr_t))
 
 /* Dtrace probe definitions */
+#if defined(SOLARIS)
+// Solaris dtrace uses actual function calls.
 #define HS_DTRACE_PROBE_N(provider,name, args) \
   DTRACE_ONLY(HS_DTRACE_PROBE_FN(provider,name) args)
 
@@ -129,3 +144,29 @@
   HS_DTRACE_PROBE_N(provider,name,((uintptr_t)a0,(uintptr_t)a1,(uintptr_t)a2,\
     (uintptr_t)a3,(uintptr_t)a4,(uintptr_t)a5,(uintptr_t)a6,(uintptr_t)a7,\
     (uintptr_t)a8,(uintptr_t)a9))
+#else
+// Systemtap dtrace compatible probes on GNU/Linux use direct macros.
+#define HS_DTRACE_PROBE(provider,name) HS_DTRACE_PROBE0(provider,name)
+#define HS_DTRACE_PROBE0(provider,name)\
+  DTRACE_PROBE(provider,name)
+#define HS_DTRACE_PROBE1(provider,name,a0)\
+  DTRACE_PROBE1(provider,name,a0)
+#define HS_DTRACE_PROBE2(provider,name,a0,a1)\
+  DTRACE_PROBE2(provider,name,a0,a1)
+#define HS_DTRACE_PROBE3(provider,name,a0,a1,a2)\
+  DTRACE_PROBE3(provider,name,a0,a1,a2)
+#define HS_DTRACE_PROBE4(provider,name,a0,a1,a2,a3)\
+  DTRACE_PROBE4(provider,name,a0,a1,a2,a3)
+#define HS_DTRACE_PROBE5(provider,name,a0,a1,a2,a3,a4)\
+  DTRACE_PROBE5(provider,name,a0,a1,a2,a3,a4)
+#define HS_DTRACE_PROBE6(provider,name,a0,a1,a2,a3,a4,a5)\
+  DTRACE_PROBE6(provider,name,a0,a1,a2,a3,a4,a5)
+#define HS_DTRACE_PROBE7(provider,name,a0,a1,a2,a3,a4,a5,a6)\
+  DTRACE_PROBE7(provider,name,a0,a1,a2,a3,a4,a5,a6)
+#define HS_DTRACE_PROBE8(provider,name,a0,a1,a2,a3,a4,a5,a6,a7)\
+  DTRACE_PROBE8(provider,name,a0,a1,a2,a3,a4,a5,a6,a7)
+#define HS_DTRACE_PROBE9(provider,name,a0,a1,a2,a3,a4,a5,a6,a7,a8)\
+  DTRACE_PROBE9(provider,name,a0,a1,a2,a3,a4,a5,a6,a7,a8)
+#define HS_DTRACE_PROBE10(provider,name,a0,a1,a2,a3,a4,a5,a6,a7,a8)\
+  DTRACE_PROBE10(provider,name,a0,a1,a2,a3,a4,a5,a6,a7,a8)
+#endif
