Skip to content
Permalink
Browse files

Merge

  • Loading branch information
JesperIRL committed Jan 20, 2020
2 parents 330100d + f7165c3 commit b936939454c9c23fcb7b45361bff504852376cce
Showing with 465 additions and 94 deletions.
  1. +3 −1 src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp
  2. +3 −3 src/hotspot/share/jfr/leakprofiler/chains/bfsClosure.cpp
  3. +2 −2 src/hotspot/share/jfr/leakprofiler/chains/dfsClosure.cpp
  4. +2 −2 src/hotspot/share/jfr/leakprofiler/chains/edgeStore.cpp
  5. +6 −9 src/hotspot/share/jfr/leakprofiler/chains/objectSampleMarker.hpp
  6. +4 −2 src/hotspot/share/jfr/leakprofiler/checkpoint/eventEmitter.cpp
  7. +2 −3 src/hotspot/share/oops/markWord.hpp
  8. +2 −1 src/hotspot/share/opto/loopPredicate.cpp
  9. +5 −5 src/hotspot/share/opto/loopnode.cpp
  10. +2 −2 src/java.desktop/macosx/classes/sun/lwawt/LWLightweightFramePeer.java
  11. +3 −3 src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/MemoryAddress.java
  12. +1 −1 src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/MemoryLayout.java
  13. +9 −12 src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/MemorySegment.java
  14. +1 −1 src/jdk.incubator.foreign/share/classes/jdk/incubator/foreign/package-info.java
  15. +9 −5 ...vadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractExecutableMemberWriter.java
  16. +1 −1 ...avadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AnnotationTypeFieldWriterImpl.java
  17. +1 −1 ...are/classes/jdk/javadoc/internal/doclets/formats/html/AnnotationTypeRequiredMemberWriterImpl.java
  18. +8 −0 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/ClassWriterImpl.java
  19. +2 −2 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/FieldWriterImpl.java
  20. +9 −0 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/HtmlDocletWriter.java
  21. +2 −2 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/MethodWriterImpl.java
  22. +2 −2 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/PropertyWriterImpl.java
  23. +12 −2 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TagletWriterImpl.java
  24. +1 −1 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/ReturnTaglet.java
  25. +10 −1 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/TagletWriter.java
  26. +55 −14 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/taglets/ThrowsTaglet.java
  27. +46 −7 src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/Utils.java
  28. +175 −0 test/jdk/javax/swing/JLightweightFrame/ResizedMovedEvents.java
  29. +41 −6 test/langtools/jdk/javadoc/doclet/testMemberInheritance/TestMemberInheritance.java
  30. +1 −1 test/langtools/jdk/javadoc/doclet/testMemberInheritance/pkg2/DocumentedNonGenericChild.java
  31. +10 −2 test/langtools/jdk/javadoc/doclet/testMemberInheritance/pkg2/UndocumentedGenericParent.java
  32. +35 −0 test/langtools/jdk/javadoc/doclet/testMemberInheritance/pkg3/PrivateGenericParent.java
@@ -1332,7 +1332,9 @@ void ShenandoahHeap::object_iterate(ObjectClosure* cl) {

// Keep alive an object that was loaded with AS_NO_KEEPALIVE.
void ShenandoahHeap::keep_alive(oop obj) {
ShenandoahBarrierSet::barrier_set()->enqueue(obj);
if (is_concurrent_mark_in_progress()) {
ShenandoahBarrierSet::barrier_set()->enqueue(obj);
}
}

void ShenandoahHeap::heap_region_iterate(ShenandoahHeapRegionClosure* blk) const {
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -131,7 +131,7 @@ void BFSClosure::closure_impl(UnifiedOopRef reference, const oop pointee) {
if (!_mark_bits->is_marked(pointee)) {
_mark_bits->mark_obj(pointee);
// is the pointee a sample object?
if (NULL == pointee->mark().to_pointer()) {
if (pointee->mark().is_marked()) {
add_chain(reference, pointee);
}

@@ -148,7 +148,7 @@ void BFSClosure::closure_impl(UnifiedOopRef reference, const oop pointee) {

void BFSClosure::add_chain(UnifiedOopRef reference, const oop pointee) {
assert(pointee != NULL, "invariant");
assert(NULL == pointee->mark().to_pointer(), "invariant");
assert(pointee->mark().is_marked(), "invariant");
Edge leak_edge(_current_parent, reference);
_edge_store->put_chain(&leak_edge, _current_parent == NULL ? 1 : _current_frontier_level + 2);
}
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -121,7 +121,7 @@ void DFSClosure::closure_impl(UnifiedOopRef reference, const oop pointee) {
assert(_mark_bits->is_marked(pointee), "invariant");

// is the pointee a sample object?
if (NULL == pointee->mark().to_pointer()) {
if (pointee->mark().is_marked()) {
add_chain();
}

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2014, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2014, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -231,7 +231,7 @@ StoredEdge* EdgeStore::associate_leak_context_with_candidate(const Edge* edge) {
StoredEdge* const leak_context_edge = put(edge->reference());
oop sample_object = edge->pointee();
assert(sample_object != NULL, "invariant");
assert(NULL == sample_object->mark().to_pointer(), "invariant");
assert(sample_object->mark().is_marked(), "invariant");
sample_object->set_mark(markWord::from_pointer(leak_context_edge));
return leak_context_edge;
}
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2017, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2017, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -67,14 +67,11 @@ class ObjectSampleMarker : public StackObj {
assert(obj != NULL, "invariant");
// save the original markWord
_store->push(ObjectSampleMarkWord(obj, obj->mark()));
// now we will "poison" the mark word of the sample object
// to the intermediate monitor INFLATING state.
// This is an "impossible" state during a safepoint,
// hence we will use it to quickly identify sample objects
// during the reachability search from gc roots.
assert(NULL == markWord::INFLATING().to_pointer(), "invariant");
obj->set_mark(markWord::INFLATING());
assert(NULL == obj->mark().to_pointer(), "invariant");
// now we will set the mark word to "marked" in order to quickly
// identify sample objects during the reachability search from gc roots.
assert(!obj->mark().is_marked(), "should only mark an object once");
obj->set_mark(markWord::prototype().set_marked());
assert(obj->mark().is_marked(), "invariant");
}
};

@@ -1,5 +1,5 @@
/*
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2019, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -116,7 +116,9 @@ void EventEmitter::write_event(const ObjectSample* sample, EdgeStore* edge_store
traceid gc_root_id = 0;
const Edge* edge = NULL;
if (SafepointSynchronize::is_at_safepoint()) {
edge = (const Edge*)(sample->object())->mark().to_pointer();
if (!sample->object()->mark().is_marked()) {
edge = (const Edge*)(sample->object())->mark().to_pointer();
}
}
if (edge == NULL) {
// In order to dump out a representation of the event
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -83,8 +83,7 @@
// [ptr | 00] locked ptr points to real header on stack
// [header | 0 | 01] unlocked regular object header
// [ptr | 10] monitor inflated lock (header is wapped out)
// [ptr | 11] marked used by markSweep to mark an object
// not valid at any other time
// [ptr | 11] marked used to mark an object
//
// We assume that stack/thread pointers have the lowest two bits cleared.

@@ -1389,8 +1389,9 @@ bool PhaseIdealLoop::loop_predication_impl(IdealLoopTree *loop) {
// an early loop exit. Try them with profile data.
while (if_proj_list.size() > 0) {
Node* proj = if_proj_list.pop();
float f = pf.to(proj);
if (proj->as_Proj()->is_uncommon_trap_if_pattern(Deoptimization::Reason_none) &&
pf.to(proj) * loop_trip_cnt >= 1) {
f * loop_trip_cnt >= 1) {
hoisted = loop_predication_impl_helper(loop, proj->as_Proj(), profile_predicate_proj, cl, zero, invar, Deoptimization::Reason_profile_predicate) | hoisted;
}
}
@@ -946,19 +946,19 @@ Node *LoopNode::Ideal(PhaseGVN *phase, bool can_reshape) {

#ifdef ASSERT
void LoopNode::verify_strip_mined(int expect_skeleton) const {
if (!is_valid_counted_loop()) {
return; // Skip malformed counted loop
}
const OuterStripMinedLoopNode* outer = NULL;
const CountedLoopNode* inner = NULL;
if (is_strip_mined()) {
if (!is_valid_counted_loop()) {
return; // Skip malformed counted loop
}
assert(is_CountedLoop(), "no Loop should be marked strip mined");
inner = as_CountedLoop();
outer = inner->in(LoopNode::EntryControl)->as_OuterStripMinedLoop();
} else if (is_OuterStripMinedLoop()) {
outer = this->as_OuterStripMinedLoop();
inner = outer->unique_ctrl_out()->as_CountedLoop();
assert(inner->is_valid_counted_loop(), "OuterStripMinedLoop should have been removed");
assert(inner->is_valid_counted_loop() && inner->is_strip_mined(), "OuterStripMinedLoop should have been removed");
assert(!is_strip_mined(), "outer loop shouldn't be marked strip mined");
}
if (inner != NULL || outer != NULL) {
@@ -1240,7 +1240,7 @@ Node* CountedLoopNode::match_incr_with_optional_truncation(
}

LoopNode* CountedLoopNode::skip_strip_mined(int expect_skeleton) {
if (is_strip_mined()) {
if (is_strip_mined() && is_valid_counted_loop()) {
verify_strip_mined(expect_skeleton);
return in(EntryControl)->as_Loop();
}
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2013, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2013, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -90,7 +90,7 @@ public Insets getInsets() {

@Override
public void setBounds(int x, int y, int w, int h, int op) {
setBounds(x, y, w, h, op, true, false);
setBounds(x, y, w, h, op, true, true);
}

@Override
@@ -97,10 +97,10 @@

/**
* Perform bulk copy from source address to target address. More specifically, the bytes at addresses {@code src}
* through {@code src.offset(bytes - 1)} are copied into addresses {@code dst} through {@code dst.offset(bytes - 1)}.
* through {@code src.addOffset(bytes - 1)} are copied into addresses {@code dst} through {@code dst.addOffset(bytes - 1)}.
* If the source and address ranges overlap, then the copying is performed as if the bytes at addresses {@code src}
* through {@code src.offset(bytes - 1)} were first copied into a temporary segment with size {@code bytes},
* and then the contents of the temporary segment were copied into the bytes at addresses {@code dst} through {@code dst.offset(bytes - 1)}.
* through {@code src.addOffset(bytes - 1)} were first copied into a temporary segment with size {@code bytes},
* and then the contents of the temporary segment were copied into the bytes at addresses {@code dst} through {@code dst.addOffset(bytes - 1)}.
* @param src the source address.
* @param dst the target address.
* @param bytes the number of bytes to be copied.
@@ -110,7 +110,7 @@
*
* We can obtain the offset of the member layout named <code>value</code> from <code>seq</code>, as follows:
* <blockquote><pre>{@code
long valueOffset = seq.offset(PathElement.sequenceElement(), PathElement.groupElement("value"));
long valueOffset = seq.addOffset(PathElement.sequenceElement(), PathElement.groupElement("value"));
* }</pre></blockquote>
*
* Similarly, we can select the member layout named {@code value}, as follows:
@@ -348,10 +348,9 @@ static MemorySegment ofArray(double[] arr) {
allocateNative(layout.bytesSize(), layout.bytesAlignment());
* }</pre></blockquote>
*
* @implNote The initialization state of the contents of the block of off-heap memory associated with the returned native memory
* segment is unspecified and should not be relied upon. Moreover, a client is responsible to call the {@link MemorySegment#close()}
* on a native memory segment, to make sure the backing off-heap memory block is deallocated accordingly. Failure to do so
* will result in off-heap memory leaks.
* @implNote The block of off-heap memory associated with the returned native memory segment is initialized to zero.
* Moreover, a client is responsible to call the {@link MemorySegment#close()} on a native memory segment,
* to make sure the backing off-heap memory block is deallocated accordingly. Failure to do so will result in off-heap memory leaks.
*
* @param layout the layout of the off-heap memory block backing the native memory segment.
* @return a new native memory segment.
@@ -369,10 +368,9 @@ static MemorySegment allocateNative(MemoryLayout layout) {
allocateNative(bytesSize, 1);
* }</pre></blockquote>
*
* @implNote The initialization state of the contents of the block of off-heap memory associated with the returned native memory
* segment is unspecified and should not be relied upon. Moreover, a client is responsible to call the {@link MemorySegment#close()}
* on a native memory segment, to make sure the backing off-heap memory block is deallocated accordingly. Failure to do so
* will result in off-heap memory leaks.
* @implNote The block of off-heap memory associated with the returned native memory segment is initialized to zero.
* Moreover, a client is responsible to call the {@link MemorySegment#close()} on a native memory segment,
* to make sure the backing off-heap memory block is deallocated accordingly. Failure to do so will result in off-heap memory leaks.
*
* @param bytesSize the size (in bytes) of the off-heap memory block backing the native memory segment.
* @return a new native memory segment.
@@ -404,10 +402,9 @@ static MemorySegment mapFromPath(Path path, long bytesSize, FileChannel.MapMode
* Creates a new native memory segment that models a newly allocated block of off-heap memory with given size and
* alignment constraint (in bytes).
*
* @implNote The initialization state of the contents of the block of off-heap memory associated with the returned native memory
* segment is unspecified and should not be relied upon. Moreover, a client is responsible to call the {@link MemorySegment#close()}
* on a native memory segment, to make sure the backing off-heap memory block is deallocated accordingly. Failure to do so
* will result in off-heap memory leaks.
* @implNote The block of off-heap memory associated with the returned native memory segment is initialized to zero.
* Moreover, a client is responsible to call the {@link MemorySegment#close()} on a native memory segment,
* to make sure the backing off-heap memory block is deallocated accordingly. Failure to do so will result in off-heap memory leaks.
*
* @param bytesSize the size (in bytes) of the off-heap memory block backing the native memory segment.
* @param alignmentBytes the alignment constraint (in bytes) of the off-heap memory block backing the native memory segment.
@@ -33,7 +33,7 @@
try (MemorySegment segment = MemorySegment.allocateNative(10 * 4)) {
MemoryAddress base = segment.baseAddress();
for (long i = 0 ; i < 10 ; i++) {
intHandle.set(base.offset(i * 4), (int)i);
intHandle.set(base.addOffset(i * 4), (int)i);
}
}
* }</pre>
@@ -35,6 +35,7 @@
import javax.lang.model.element.VariableElement;
import javax.lang.model.type.ArrayType;
import javax.lang.model.type.DeclaredType;
import javax.lang.model.type.ExecutableType;
import javax.lang.model.type.TypeMirror;
import javax.lang.model.type.TypeVariable;
import javax.lang.model.util.SimpleTypeVisitor9;
@@ -141,10 +142,10 @@ protected void addInheritedSummaryLink(TypeElement te, Element member, Content l
* @param isVarArg true if this is a link to var arg.
* @param tree the content tree to which the parameter information will be added.
*/
protected void addParam(ExecutableElement member, VariableElement param,
protected void addParam(ExecutableElement member, VariableElement param, TypeMirror paramType,
boolean isVarArg, Content tree) {
Content link = writer.getLink(new LinkInfoImpl(configuration, EXECUTABLE_MEMBER_PARAM,
param.asType()).varargs(isVarArg));
paramType).varargs(isVarArg));
tree.add(link);
if(name(param).length() > 0) {
tree.add(Entity.NO_BREAK_SPACE);
@@ -208,9 +209,11 @@ protected Content getParameters(ExecutableElement member, boolean includeAnnotat
sep = "," + DocletConstants.NL;
}
int paramstart;
ExecutableType instMeth = utils.asInstantiatedMethodType(typeElement, member);
for (paramstart = 0; paramstart < parameters.size(); paramstart++) {
paramTree.add(sep);
VariableElement param = parameters.get(paramstart);
TypeMirror paramType = instMeth.getParameterTypes().get(paramstart);

if (param.getKind() != ElementKind.INSTANCE_INIT) {
if (includeAnnotations) {
@@ -220,7 +223,7 @@ protected Content getParameters(ExecutableElement member, boolean includeAnnotat
paramTree.add(DocletConstants.NL);
}
}
addParam(member, param,
addParam(member, param, paramType,
(paramstart == parameters.size() - 1) && member.isVarArgs(), paramTree);
break;
}
@@ -237,7 +240,8 @@ protected Content getParameters(ExecutableElement member, boolean includeAnnotat
paramTree.add(DocletConstants.NL);
}
}
addParam(member, parameters.get(i), (i == parameters.size() - 1) && member.isVarArgs(),
addParam(member, parameters.get(i), instMeth.getParameterTypes().get(i),
(i == parameters.size() - 1) && member.isVarArgs(),
paramTree);
}

@@ -251,7 +255,7 @@ protected Content getParameters(ExecutableElement member, boolean includeAnnotat
* @return the content tree containing the exceptions information.
*/
protected Content getExceptions(ExecutableElement member) {
List<? extends TypeMirror> exceptions = member.getThrownTypes();
List<? extends TypeMirror> exceptions = utils.asInstantiatedMethodType(typeElement, member).getThrownTypes();
Content htmltree = new ContentBuilder();
if (!exceptions.isEmpty()) {
Content link = writer.getLink(new LinkInfoImpl(configuration, MEMBER, exceptions.get(0)));
@@ -247,7 +247,7 @@ private TypeMirror getType(Element member) {
if (utils.isConstructor(member))
return null;
if (utils.isExecutableElement(member))
return utils.getReturnType((ExecutableElement)member);
return utils.getReturnType(typeElement, (ExecutableElement)member);
return member.asType();
}
}
@@ -251,7 +251,7 @@ protected Content getDeprecatedLink(Element member) {

private TypeMirror getType(Element member) {
return utils.isExecutableElement(member)
? utils.getReturnType((ExecutableElement) member)
? utils.getReturnType(typeElement, (ExecutableElement) member)
: member.asType();
}
}
@@ -204,6 +204,14 @@ public Content getClassInfo(Content classInfoTree) {
return getMemberTree(HtmlStyle.description, classInfoTree);
}

/**
* {@inheritDoc}
*/
@Override
protected TypeElement getCurrentPageElement() {
return typeElement;
}

/**
* {@inheritDoc}
*/
@@ -114,7 +114,7 @@ public Content getFieldDocTreeHeader(VariableElement field) {
@Override
public Content getSignature(VariableElement field) {
return new MemberSignature(field)
.addType(field.asType())
.addType(utils.asInstantiatedFieldType(typeElement, field))
.toContent();
}

@@ -246,7 +246,7 @@ protected void addInheritedSummaryLink(TypeElement typeElement, Element member,
*/
@Override
protected void addSummaryType(Element member, Content tdSummaryType) {
addModifierAndType(member, member.asType(), tdSummaryType);
addModifierAndType(member, utils.asInstantiatedFieldType(typeElement, (VariableElement)member), tdSummaryType);
}

/**
@@ -860,6 +860,15 @@ public String getEnclosingPackageName(TypeElement te) {
return (encl.isUnnamed()) ? "" : (encl.getQualifiedName() + ".");
}

/**
* Return the main type element of the current page or null for pages that don't have one.
*
* @return the type element of the current page.
*/
protected TypeElement getCurrentPageElement() {
return null;
}

/**
* Add the class link, with only class name as the strong link and prefixing
* plain package name.

0 comments on commit b936939

Please sign in to comment.