test/hotspot/jtreg/Makefile
changeset 48624 5f86c562a39e
parent 48096 513e0b467a92
child 48677 62b6e9b1dfdc
equal deleted inserted replaced
48623:b1006bbb925a 48624:5f86c562a39e
     1 #
     1 #
     2 # Copyright (c) 1995, 2016, Oracle and/or its affiliates. All rights reserved.
     2 # Copyright (c) 1995, 2018, Oracle and/or its affiliates. All rights reserved.
     3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4 #
     4 #
     5 # This code is free software; you can redistribute it and/or modify it
     5 # This code is free software; you can redistribute it and/or modify it
     6 # under the terms of the GNU General Public License version 2 only, as
     6 # under the terms of the GNU General Public License version 2 only, as
     7 # published by the Free Software Foundation.  Oracle designates this
     7 # published by the Free Software Foundation.  Oracle designates this
    64 
    64 
    65 ifndef CONCURRENCY_FACTOR
    65 ifndef CONCURRENCY_FACTOR
    66   CONCURRENCY_FACTOR = 1
    66   CONCURRENCY_FACTOR = 1
    67 endif
    67 endif
    68 
    68 
    69 # Concurrency based on min(cores / 2, 12)
    69 # Concurrency based on min(cores / 2, 12) * CONCURRENCY_FACTOR
    70 CONCURRENCY := $(shell awk 'BEGIN { printf "%.0f", $(NUM_CORES) / 2 * $(CONCURRENCY_FACTOR) }')
    70 CONCURRENCY := $(shell awk \
    71 ifeq ($(CONCURRENCY), 0)
    71   'BEGIN { \
    72   CONCURRENCY := 1
    72     c = $(NUM_CORES) / 2; \
    73 else ifeq ($(shell expr $(CONCURRENCY) \> 12), 1)
    73     if (c > 12) c = 12; \
    74   CONCURRENCY := 12
    74     c = c * $(CONCURRENCY_FACTOR); \
    75 endif
    75     if (c < 1) c = 1; \
       
    76     printf "%.0f", c; \
       
    77   }')
    76 
    78 
    77 # Make sure MaxRAMPercentage is high enough to not cause OOM or swapping since we may end up with a lot of JVM's
    79 # Make sure MaxRAMPercentage is high enough to not cause OOM or swapping since we may end up with a lot of JVM's
    78 JTREG_BASIC_OPTIONS += -vmoption:-XX:MaxRAMPercentage=$(shell expr 25 / $(CONCURRENCY))
    80 JTREG_BASIC_OPTIONS += -vmoption:-XX:MaxRAMPercentage=$(shell expr 25 / $(CONCURRENCY))
    79 
    81 
    80 # Include the common base file with most of the logic
    82 # Include the common base file with most of the logic