RFR: 8151438: UL instantiates duplicate tag sets
marcus.larsson at oracle.com
Wed Mar 23 09:23:42 UTC 2016
Please review the following patch to fix the issue where duplicate
tagsets are created for the same logical tagset.
The code that emulates the variadic template arguments assumes that
_NO_TAG terminates the sequence of tags. If other tags (other than
_NO_TAG) follow a terminating tag, template instances that are otherwise
considered equal (since they share tags up until the terminating tag),
might not be considered equal in the template sense (one of the template
arguments can differ). This would cause another template instantiation
for the same logical tagset and we end up with logical duplicates.
The if-statement to append the 'start' tag in
GCTraceTimeImpl::log_start() caused such problematic template
instantiations, so any tagset used with GCTraceTime would be duplicated.
To fix this, the template instantiation has been forced to only be made
once, ensuring no real tag follows the first _NO_TAG by using the
This patch also includes a test checking for invalid tagsets like these,
and also checks for tagsets that are just permutations of other tagsets.
Such tagsets should be avoided to prevent confusion, and to reduce
overhead. (The test exposed one case where a different permutation was
used, so I've fixed that as well.)
New internal VM test through RBT.
More information about the hotspot-gc-dev