Path: blob/aarch64-shenandoah-jdk8u272-b10/hotspot/make/linux/makefiles/dtrace.make
32284 views
#1# Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.2# Copyright (c) 2012 Red Hat, Inc.3# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.4#5# This code is free software; you can redistribute it and/or modify it6# under the terms of the GNU General Public License version 2 only, as7# published by the Free Software Foundation.8#9# This code is distributed in the hope that it will be useful, but WITHOUT10# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or11# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License12# version 2 for more details (a copy is included in the LICENSE file that13# accompanied this code).14#15# You should have received a copy of the GNU General Public License version16# 2 along with this work; if not, write to the Free Software Foundation,17# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.18#19# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA20# or visit www.oracle.com if you need additional information or have any21# questions.22#23#2425# Linux does not build jvm_db26LIBJVM_DB =2728# Only OPENJDK builds test and support SDT probes currently.29ifndef OPENJDK30REASON = "This JDK does not support SDT probes"31else3233# We need a recent GCC for the default (4.4 or later)34ifeq "$(shell expr \( \( $(CC_VER_MAJOR) = 4 \) \& \( $(CC_VER_MINOR) \>= 4 \) \) \| \( $(CC_VER_MAJOR) \>= 5 \) )" "0"35REASON = "gcc version is too old"36else3738# But it does have a SystemTap dtrace compatible sys/sdt.h39ifneq ($(ALT_SDT_H),)40SDT_H_FILE = $(ALT_SDT_H)41else42SDT_H_FILE = /usr/include/sys/sdt.h43endif44DTRACE_ENABLED = $(shell test -f $(SDT_H_FILE) && echo $(SDT_H_FILE))45REASON = "$(SDT_H_FILE) not found"4647ifneq ($(DTRACE_ENABLED),)48CFLAGS += -DDTRACE_ENABLED49endif5051endif52endif5354# Phony target used in vm.make build target to check whether enabled.55.PHONY: dtraceCheck56ifeq ($(DTRACE_ENABLED),)57dtraceCheck:58$(QUIETLY) echo "**NOTICE** Dtrace support disabled: $(REASON)"59else60dtraceCheck:61endif6263# It doesn't support HAVE_DTRACE_H though.64656667