[PATCH 3 of 3] XXXXXX: Enable dtrace compatible sdt probes on GNU/Linux builds
Daniel D. Daugherty
daniel.daugherty at oracle.com
Thu May 10 08:52:40 PDT 2012
Adding serviceability-dev at openjdk.java.net to this e-mail thread.
On 5/10/12 7:49 AM, Mark Wielaard wrote:
> make/linux/makefiles/dtrace.make | 24 ++++++++++++++++++++++++
> make/linux/makefiles/vm.make | 2 +-
> 2 files changed, 25 insertions(+), 1 deletions(-)
>
>
> # HG changeset patch
> # User Mark Wielaard<mark at klomp.org>
> # Date 1336657292 -7200
> # Node ID 6a35858b331dca2ce76b6328ff57f893349303a0
> # Parent ec675cf936d8eeefb11b7624c8f292fdd7e1f847
> XXXXXX: Enable dtrace compatible sdt probes on GNU/Linux builds.
> Summary: If sys/sdt.h is found, then enable dtrace compatible sdt probes.
> Contributed-by: Mark Wielaard<mjw at redhat.com>
>
> diff -r ec675cf936d8 -r 6a35858b331d make/linux/makefiles/dtrace.make
> --- a/make/linux/makefiles/dtrace.make Thu May 10 15:38:24 2012 +0200
> +++ b/make/linux/makefiles/dtrace.make Thu May 10 15:41:32 2012 +0200
> @@ -1,5 +1,6 @@
> #
> # Copyright (c) 2005, 2008, Oracle and/or its affiliates. All rights reserved.
> +# Copyright (c) 2012 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
> @@ -25,3 +26,26 @@
> # Linux does not build jvm_db
> LIBJVM_DB =
>
> +# But it does have a SystemTap dtrace compatible sys/sdt.h
> +ifneq ($(ALT_SDT_H),)
> + SDT_H_FILE = $(ALT_SDT_H)
> +else
> + SDT_H_FILE = /usr/include/sys/sdt.h
> +endif
> +DTRACE_ENABLED = $(shell test -f $(SDT_H_FILE)&& echo $(SDT_H_FILE))
> +
> +ifneq ($(DTRACE_ENABLED),)
> + CFLAGS += -DDTRACE_ENABLED
> +endif
> +
> +# Phone target used in vm.make build target to check whether enabled.
> +.PHONY: dtraceCheck
> +ifeq ($(DTRACE_ENABLED),)
> +dtraceCheck:
> + $(QUIETLY) echo "**NOTICE** Dtrace support disabled $(SDT_H_FILE) not found"
> +else
> +dtraceCheck:
> +endif
> +
> +# It doesn't support HAVE_DTRACE_H though.
> +
> diff -r ec675cf936d8 -r 6a35858b331d make/linux/makefiles/vm.make
> --- a/make/linux/makefiles/vm.make Thu May 10 15:38:24 2012 +0200
> +++ b/make/linux/makefiles/vm.make Thu May 10 15:41:32 2012 +0200
> @@ -383,7 +383,7 @@
>
> #----------------------------------------------------------------------
>
> -build: $(LIBJVM) $(LAUNCHER) $(LIBJSIG) $(LIBJVM_DB) $(BUILDLIBSAPROC) $(WB_JAR)
> +build: $(LIBJVM) $(LAUNCHER) $(LIBJSIG) $(LIBJVM_DB) $(BUILDLIBSAPROC) dtraceCheck $(WB_JAR)
>
> install: install_jvm install_jsig install_saproc
>
More information about the serviceability-dev
mailing list