make/linux/makefiles/dtrace.make

Fri, 28 Aug 2020 07:38:21 +0100

author
andrew
date
Fri, 28 Aug 2020 07:38:21 +0100
changeset 9995
633a3d28d2fe
parent 7856
42c0a8631742
child 7994
04ff2f6cd0eb
permissions
-rw-r--r--

8251120: [8u] HotSpot build assumes ENABLE_JFR is set to either true or false
Summary: Only test for ENABLE_JFR being true, and assume undefined == false
Reviewed-by: neugens

duke@435 1 #
coleenp@4148 2 # Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
coleenp@4148 3 # Copyright (c) 2012 Red Hat, Inc.
duke@435 4 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
duke@435 5 #
duke@435 6 # This code is free software; you can redistribute it and/or modify it
duke@435 7 # under the terms of the GNU General Public License version 2 only, as
duke@435 8 # published by the Free Software Foundation.
duke@435 9 #
duke@435 10 # This code is distributed in the hope that it will be useful, but WITHOUT
duke@435 11 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
duke@435 12 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
duke@435 13 # version 2 for more details (a copy is included in the LICENSE file that
duke@435 14 # accompanied this code).
duke@435 15 #
duke@435 16 # You should have received a copy of the GNU General Public License version
duke@435 17 # 2 along with this work; if not, write to the Free Software Foundation,
duke@435 18 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
duke@435 19 #
trims@1907 20 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
trims@1907 21 # or visit www.oracle.com if you need additional information or have any
trims@1907 22 # questions.
duke@435 23 #
duke@435 24 #
duke@435 25
duke@435 26 # Linux does not build jvm_db
duke@435 27 LIBJVM_DB =
duke@435 28
coleenp@4148 29 # Only OPENJDK builds test and support SDT probes currently.
coleenp@4148 30 ifndef OPENJDK
coleenp@4148 31 REASON = "This JDK does not support SDT probes"
coleenp@4148 32 else
coleenp@4148 33
ysuenaga@7856 34 # We need a recent GCC for the default (4.4 or later)
ysuenaga@7856 35 ifeq "$(shell expr \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 4 \) \) \| \( $(CC_VER_MAJOR) \>= 5 \) )" "0"
coleenp@4148 36 REASON = "gcc version is too old"
coleenp@4148 37 else
coleenp@4148 38
coleenp@4148 39 # But it does have a SystemTap dtrace compatible sys/sdt.h
coleenp@4148 40 ifneq ($(ALT_SDT_H),)
coleenp@4148 41 SDT_H_FILE = $(ALT_SDT_H)
coleenp@4148 42 else
coleenp@4148 43 SDT_H_FILE = /usr/include/sys/sdt.h
coleenp@4148 44 endif
coleenp@4148 45 DTRACE_ENABLED = $(shell test -f $(SDT_H_FILE) && echo $(SDT_H_FILE))
coleenp@4148 46 REASON = "$(SDT_H_FILE) not found"
coleenp@4148 47
coleenp@4148 48 ifneq ($(DTRACE_ENABLED),)
coleenp@4148 49 CFLAGS += -DDTRACE_ENABLED
coleenp@4148 50 endif
coleenp@4148 51
coleenp@4148 52 endif
coleenp@4148 53 endif
coleenp@4148 54
coleenp@4148 55 # Phony target used in vm.make build target to check whether enabled.
coleenp@4148 56 .PHONY: dtraceCheck
coleenp@4148 57 ifeq ($(DTRACE_ENABLED),)
coleenp@4148 58 dtraceCheck:
coleenp@4148 59 $(QUIETLY) echo "**NOTICE** Dtrace support disabled: $(REASON)"
coleenp@4148 60 else
coleenp@4148 61 dtraceCheck:
coleenp@4148 62 endif
coleenp@4148 63
coleenp@4148 64 # It doesn't support HAVE_DTRACE_H though.
coleenp@4148 65

mercurial