make/linux/makefiles/dtrace.make

Wed, 14 Oct 2020 17:44:48 +0800

author
aoqi
date
Wed, 14 Oct 2020 17:44:48 +0800
changeset 9931
fd44df5e3bc3
parent 7994
04ff2f6cd0eb
permissions
-rw-r--r--

Merge

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

mercurial