--- a/hotspot/src/os/bsd/dtrace/generateJvmOffsets.cpp Fri Aug 07 09:15:42 2015 -0400
+++ b/hotspot/src/os/bsd/dtrace/generateJvmOffsets.cpp Sat Aug 08 00:27:39 2015 +0200
@@ -108,7 +108,7 @@
#define GEN_SIZE(Type) \
switch(gen_variant) { \
case GEN_OFFSET: \
- printf("#define SIZE_%-35s %ld\n", \
+ printf("#define SIZE_%-35s %ld\n", \
#Type, sizeof(Type)); \
break; \
case GEN_INDEX: \
@@ -134,7 +134,7 @@
}
void gen_prologue(GEN_variant gen_variant) {
- const char *suffix;
+ const char *suffix = "Undefined-Suffix";
switch(gen_variant) {
case GEN_OFFSET: suffix = ".h"; break;
@@ -228,10 +228,10 @@
printf("\n");
GEN_OFFS(Method, _constMethod);
- GEN_OFFS(Method, _constants);
GEN_OFFS(Method, _access_flags);
printf("\n");
+ GEN_OFFS(ConstMethod, _constants);
GEN_OFFS(ConstMethod, _flags);
GEN_OFFS(ConstMethod, _code_size);
GEN_OFFS(ConstMethod, _name_index);
@@ -264,7 +264,7 @@
GEN_OFFS(nmethod, _method);
GEN_OFFS(nmethod, _dependencies_offset);
- GEN_OFFS(nmethod, _oops_offset);
+ GEN_OFFS(nmethod, _metadata_offset);
GEN_OFFS(nmethod, _scopes_data_offset);
GEN_OFFS(nmethod, _scopes_pcs_offset);
GEN_OFFS(nmethod, _handler_table_offset);
--- a/hotspot/src/os/bsd/dtrace/jvm_dtrace.c Fri Aug 07 09:15:42 2015 -0400
+++ b/hotspot/src/os/bsd/dtrace/jvm_dtrace.c Sat Aug 08 00:27:39 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, 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
@@ -227,7 +227,7 @@
/* attach to given JVM */
jvm_t* jvm_attach(pid_t pid) {
jvm_t* jvm;
- int door_fd, attach_fd, i;
+ int door_fd, attach_fd, i = 0;
jvm = (jvm_t*) calloc(1, sizeof(jvm_t));
if (jvm == NULL) {
@@ -292,14 +292,13 @@
/* detach the givenb JVM */
int jvm_detach(jvm_t* jvm) {
if (jvm) {
- int res;
+ int res = 0;
if (jvm->door_fd != -1) {
if (file_close(jvm->door_fd) != 0) {
set_jvm_error(JVM_ERR_CANT_CLOSE_DOOR);
res = -1;
} else {
clear_jvm_error();
- res = 0;
}
}
free(jvm);
--- a/hotspot/src/os/bsd/dtrace/libjvm_db.c Fri Aug 07 09:15:42 2015 -0400
+++ b/hotspot/src/os/bsd/dtrace/libjvm_db.c Sat Aug 08 00:27:39 2015 +0200
@@ -882,7 +882,7 @@
/* Finds a PcDesc with real-pc equal to N->pc */
static int pc_desc_at(Nmethod_t *N)
{
- uint64_t pc_diff;
+ uint64_t pc_diff = 999;
int32_t offs;
int32_t err;
--- a/hotspot/src/os/solaris/dtrace/generateJvmOffsets.cpp Fri Aug 07 09:15:42 2015 -0400
+++ b/hotspot/src/os/solaris/dtrace/generateJvmOffsets.cpp Sat Aug 08 00:27:39 2015 +0200
@@ -85,7 +85,7 @@
#define GEN_OFFS_NAME(Type,Name,OutputType) \
switch(gen_variant) { \
case GEN_OFFSET: \
- printf("#define OFFSET_%-33s %d\n", \
+ printf("#define OFFSET_%-33s %ld\n", \
#OutputType #Name, offset_of(Type, Name)); \
break; \
case GEN_INDEX: \
@@ -103,7 +103,7 @@
#define GEN_SIZE(Type) \
switch(gen_variant) { \
case GEN_OFFSET: \
- printf("#define SIZE_%-35s %d\n", \
+ printf("#define SIZE_%-35s %ld\n", \
#Type, sizeof(Type)); \
break; \
case GEN_INDEX: \
@@ -129,7 +129,7 @@
}
void gen_prologue(GEN_variant gen_variant) {
- const char *suffix;
+ const char *suffix = "Undefined-Suffix";
switch(gen_variant) {
case GEN_OFFSET: suffix = ".h"; break;
@@ -211,7 +211,7 @@
GEN_OFFS(ConstantPool, _pool_holder);
printf("\n");
- GEN_VALUE(OFFSET_HeapBlockHeader_used, offset_of(HeapBlock::Header, _used));
+ GEN_VALUE(OFFSET_HeapBlockHeader_used, (int) offset_of(HeapBlock::Header, _used));
GEN_OFFS(oopDesc, _metadata);
printf("\n");
@@ -275,7 +275,7 @@
GEN_OFFS(NarrowPtrStruct, _shift);
printf("\n");
- GEN_VALUE(SIZE_HeapBlockHeader, sizeof(HeapBlock::Header));
+ GEN_VALUE(SIZE_HeapBlockHeader, (int) sizeof(HeapBlock::Header));
GEN_SIZE(oopDesc);
GEN_SIZE(ConstantPool);
printf("\n");
--- a/hotspot/src/os/solaris/dtrace/jvm_dtrace.c Fri Aug 07 09:15:42 2015 -0400
+++ b/hotspot/src/os/solaris/dtrace/jvm_dtrace.c Sat Aug 08 00:27:39 2015 +0200
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2006, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2006, 2015, 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
@@ -227,7 +227,7 @@
/* attach to given JVM */
jvm_t* jvm_attach(pid_t pid) {
jvm_t* jvm;
- int door_fd, attach_fd, i;
+ int door_fd, attach_fd, i = 0;
jvm = (jvm_t*) calloc(1, sizeof(jvm_t));
if (jvm == NULL) {
@@ -292,14 +292,13 @@
/* detach the givenb JVM */
int jvm_detach(jvm_t* jvm) {
if (jvm) {
- int res;
+ int res = 0;
if (jvm->door_fd != -1) {
if (file_close(jvm->door_fd) != 0) {
set_jvm_error(JVM_ERR_CANT_CLOSE_DOOR);
res = -1;
} else {
clear_jvm_error();
- res = 0;
}
}
free(jvm);
--- a/hotspot/src/os/solaris/dtrace/libjvm_db.c Fri Aug 07 09:15:42 2015 -0400
+++ b/hotspot/src/os/solaris/dtrace/libjvm_db.c Sat Aug 08 00:27:39 2015 +0200
@@ -882,7 +882,7 @@
/* Finds a PcDesc with real-pc equal to N->pc */
static int pc_desc_at(Nmethod_t *N)
{
- uint64_t pc_diff;
+ uint64_t pc_diff = 999;
int32_t offs;
int32_t err;
--- a/hotspot/src/share/vm/gc/g1/g1Allocator.cpp Fri Aug 07 09:15:42 2015 -0400
+++ b/hotspot/src/share/vm/gc/g1/g1Allocator.cpp Sat Aug 08 00:27:39 2015 +0200
@@ -67,11 +67,11 @@
// retired. We have to remove it now, since we don't allow regions
// we allocate to in the region sets. We'll re-add it later, when
// it's retired again.
- _g1h->_old_set.remove(retained_region);
+ _g1h->old_set_remove(retained_region);
bool during_im = _g1h->collector_state()->during_initial_mark_pause();
retained_region->note_start_of_copying(during_im);
old->set(retained_region);
- _g1h->_hr_printer.reuse(retained_region);
+ _g1h->hr_printer()->reuse(retained_region);
evacuation_info.set_alloc_regions_used_before(retained_region->used());
}
}
@@ -264,8 +264,8 @@
}
assert(hr->is_empty(), err_msg("expected empty region (index %u)", hr->hrm_index()));
hr->set_archive();
- _g1h->_old_set.add(hr);
- _g1h->_hr_printer.alloc(hr, G1HRPrinter::Archive);
+ _g1h->old_set_add(hr);
+ _g1h->hr_printer()->alloc(hr, G1HRPrinter::Archive);
_allocated_regions.append(hr);
_allocation_region = hr;
--- a/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp Fri Aug 07 09:15:42 2015 -0400
+++ b/hotspot/src/share/vm/gc/g1/g1CollectedHeap.cpp Sat Aug 08 00:27:39 2015 +0200
@@ -6495,7 +6495,6 @@
return NULL;
}
-
// Heap region set verification
class VerifyRegionListsClosure : public HeapRegionClosure {
--- a/hotspot/src/share/vm/gc/g1/g1CollectedHeap.hpp Fri Aug 07 09:15:42 2015 -0400
+++ b/hotspot/src/share/vm/gc/g1/g1CollectedHeap.hpp Sat Aug 08 00:27:39 2015 +0200
@@ -186,8 +186,6 @@
friend class MutatorAllocRegion;
friend class SurvivorGCAllocRegion;
friend class OldGCAllocRegion;
- friend class G1Allocator;
- friend class G1ArchiveAllocator;
// Closures used in implementation.
friend class G1ParScanThreadState;
@@ -534,12 +532,6 @@
AllocationContext_t context,
bool expect_null_mutator_alloc_region);
- // It dirties the cards that cover the block so that so that the post
- // write barrier never queues anything when updating objects on this
- // block. It is assumed (and in fact we assert) that the block
- // belongs to a young region.
- inline void dirty_young_block(HeapWord* start, size_t word_size);
-
// These methods are the "callbacks" from the G1AllocRegion class.
// For mutator alloc regions.
@@ -553,10 +545,6 @@
void retire_gc_alloc_region(HeapRegion* alloc_region,
size_t allocated_bytes, InCSetState dest);
- // Allocate the highest free region in the reserved heap. This will commit
- // regions as necessary.
- HeapRegion* alloc_highest_free_region();
-
// - if explicit_gc is true, the GC is for a System.gc() or a heap
// inspection request and should collect the entire heap
// - if clear_all_soft_refs is true, all soft references should be
@@ -692,6 +680,10 @@
// Allocates a new heap region instance.
HeapRegion* new_heap_region(uint hrs_index, MemRegion mr);
+ // Allocate the highest free region in the reserved heap. This will commit
+ // regions as necessary.
+ HeapRegion* alloc_highest_free_region();
+
// Frees a non-humongous region by initializing its contents and
// adding it to the free list that's passed as a parameter (this is
// usually a local list which will be appended to the master free
@@ -705,6 +697,12 @@
bool par,
bool locked = false);
+ // It dirties the cards that cover the block so that the post
+ // write barrier never queues anything when updating objects on this
+ // block. It is assumed (and in fact we assert) that the block
+ // belongs to a young region.
+ inline void dirty_young_block(HeapWord* start, size_t word_size);
+
// Frees a humongous region by collapsing it into individual regions
// and calling free_region() for each of them. The freed regions
// will be added to the free list that's passed as a parameter (this
@@ -1183,6 +1181,7 @@
}
}
+ inline void old_set_add(HeapRegion* hr);
inline void old_set_remove(HeapRegion* hr);
size_t non_young_capacity_bytes() {
--- a/hotspot/src/share/vm/gc/g1/g1CollectedHeap.inline.hpp Fri Aug 07 09:15:42 2015 -0400
+++ b/hotspot/src/share/vm/gc/g1/g1CollectedHeap.inline.hpp Sat Aug 08 00:27:39 2015 +0200
@@ -107,6 +107,10 @@
OrderAccess::fence();
}
+inline void G1CollectedHeap::old_set_add(HeapRegion* hr) {
+ _old_set.add(hr);
+}
+
inline void G1CollectedHeap::old_set_remove(HeapRegion* hr) {
_old_set.remove(hr);
}