This commit is contained in:
Rachel Protacio 2017-04-24 17:26:11 +00:00
commit 5889c1e232
9 changed files with 47 additions and 71 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2017, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2012, 2016 SAP SE. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
@ -25,6 +25,7 @@
#include "precompiled.hpp"
#include "classfile/vmSymbols.hpp"
#include "logging/log.hpp"
#include "memory/allocation.inline.hpp"
#include "memory/resourceArea.hpp"
#include "oops/oop.inline.hpp"
@ -1244,15 +1245,10 @@ static void mmap_attach_shared(const char* user, int vmid, PerfMemory::PerfMemor
*addr = mapAddress;
*sizep = size;
if (PerfTraceMemOps) {
tty->print("mapped " SIZE_FORMAT " bytes for vmid %d at "
INTPTR_FORMAT "\n", size, vmid, p2i((void*)mapAddress));
}
log_debug(perf, memops)("mapped " SIZE_FORMAT " bytes for vmid %d at "
INTPTR_FORMAT "\n", size, vmid, p2i((void*)mapAddress));
}
// create the PerfData memory region
//
// This method creates the memory region used to store performance

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2017, 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
@ -24,6 +24,7 @@
#include "precompiled.hpp"
#include "classfile/vmSymbols.hpp"
#include "logging/log.hpp"
#include "memory/allocation.inline.hpp"
#include "memory/resourceArea.hpp"
#include "oops/oop.inline.hpp"
@ -1150,15 +1151,10 @@ static void mmap_attach_shared(const char* user, int vmid, PerfMemory::PerfMemor
*addr = mapAddress;
*sizep = size;
if (PerfTraceMemOps) {
tty->print("mapped " SIZE_FORMAT " bytes for vmid %d at "
INTPTR_FORMAT "\n", size, vmid, p2i((void*)mapAddress));
}
log_debug(perf, memops)("mapped " SIZE_FORMAT " bytes for vmid %d at "
INTPTR_FORMAT "\n", size, vmid, p2i((void*)mapAddress));
}
// create the PerfData memory region
//
// This method creates the memory region used to store performance

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2017, 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
@ -24,6 +24,7 @@
#include "precompiled.hpp"
#include "classfile/vmSymbols.hpp"
#include "logging/log.hpp"
#include "memory/allocation.inline.hpp"
#include "memory/resourceArea.hpp"
#include "oops/oop.inline.hpp"
@ -1166,15 +1167,10 @@ static void mmap_attach_shared(const char* user, int vmid, PerfMemory::PerfMemor
*addr = mapAddress;
*sizep = size;
if (PerfTraceMemOps) {
tty->print("mapped " SIZE_FORMAT " bytes for vmid %d at "
INTPTR_FORMAT "\n", size, vmid, p2i((void*)mapAddress));
}
log_debug(perf, memops)("mapped " SIZE_FORMAT " bytes for vmid %d at "
INTPTR_FORMAT "\n", size, vmid, p2i((void*)mapAddress));
}
// create the PerfData memory region
//
// This method creates the memory region used to store performance

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2017, 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
@ -24,6 +24,7 @@
#include "precompiled.hpp"
#include "classfile/vmSymbols.hpp"
#include "logging/log.hpp"
#include "memory/allocation.inline.hpp"
#include "memory/resourceArea.hpp"
#include "oops/oop.inline.hpp"
@ -1184,15 +1185,10 @@ static void mmap_attach_shared(const char* user, int vmid, PerfMemory::PerfMemor
*addr = mapAddress;
*sizep = size;
if (PerfTraceMemOps) {
tty->print("mapped " SIZE_FORMAT " bytes for vmid %d at "
INTPTR_FORMAT "\n", size, vmid, (void*)mapAddress);
}
log_debug(perf, memops)("mapped " SIZE_FORMAT " bytes for vmid %d at "
INTPTR_FORMAT "\n", size, vmid, (void*)mapAddress);
}
// create the PerfData memory region
//
// This method creates the memory region used to store performance

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2017, 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
@ -24,6 +24,7 @@
#include "precompiled.hpp"
#include "classfile/vmSymbols.hpp"
#include "logging/log.hpp"
#include "memory/allocation.inline.hpp"
#include "memory/resourceArea.hpp"
#include "oops/oop.inline.hpp"
@ -1695,10 +1696,8 @@ static void open_file_mapping(const char* user, int vmid,
// invalidating the mapped view of the file
CloseHandle(fmh);
if (PerfTraceMemOps) {
tty->print("mapped " SIZE_FORMAT " bytes for vmid %d at "
INTPTR_FORMAT "\n", size, vmid, mapAddress);
}
log_debug(perf, memops)("mapped " SIZE_FORMAT " bytes for vmid %d at "
INTPTR_FORMAT "\n", size, vmid, mapAddress);
}
// this method unmaps the the mapped view of the the

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2015, 2017, 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
@ -57,6 +57,7 @@
LOG_TAG(cpu) \
LOG_TAG(cset) \
LOG_TAG(data) \
LOG_TAG(datacreation) \
LOG_TAG(defaultmethods) \
LOG_TAG(dump) \
LOG_TAG(ergo) \
@ -82,6 +83,7 @@
LOG_TAG(logging) \
LOG_TAG(mark) \
LOG_TAG(marking) \
LOG_TAG(memops) \
LOG_TAG(methodcomparator) \
LOG_TAG(metadata) \
LOG_TAG(metaspace) \
@ -98,6 +100,7 @@
LOG_TAG(pagesize) \
LOG_TAG(patch) \
LOG_TAG(path) \
LOG_TAG(perf) \
LOG_TAG(phases) \
LOG_TAG(plab) \
LOG_TAG(promotion) \

View File

@ -3811,12 +3811,6 @@ public:
range(PeriodicTask::min_interval, max_jint) \
constraint(PerfDataSamplingIntervalFunc, AfterErgo) \
\
develop(bool, PerfTraceDataCreation, false, \
"Trace creation of Performance Data Entries") \
\
develop(bool, PerfTraceMemOps, false, \
"Trace PerfMemory create/attach/detach calls") \
\
product(bool, PerfDisableSharedMem, false, \
"Store performance data in standard memory") \
\

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2017, 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
@ -24,6 +24,7 @@
#include "precompiled.hpp"
#include "classfile/vmSymbols.hpp"
#include "logging/log.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/handles.inline.hpp"
#include "runtime/java.hpp"
@ -166,17 +167,15 @@ void PerfData::create_entry(BasicType dtype, size_t dsize, size_t vlen) {
pdep->flags = (jbyte)flags();
pdep->data_offset = (jint) data_start;
if (PerfTraceDataCreation) {
tty->print("name = %s, dtype = %d, variability = %d,"
" units = %d, dsize = " SIZE_FORMAT ", vlen = " SIZE_FORMAT ","
" pad_length = " SIZE_FORMAT ", size = " SIZE_FORMAT ", on_c_heap = %s,"
" address = " INTPTR_FORMAT ","
" data address = " INTPTR_FORMAT "\n",
cname, dtype, variability(),
units(), dsize, vlen,
pad_length, size, is_on_c_heap() ? "TRUE":"FALSE",
p2i(psmp), p2i(valuep));
}
log_debug(perf, datacreation)("name = %s, dtype = %d, variability = %d,"
" units = %d, dsize = " SIZE_FORMAT ", vlen = " SIZE_FORMAT ","
" pad_length = " SIZE_FORMAT ", size = " SIZE_FORMAT ", on_c_heap = %s,"
" address = " INTPTR_FORMAT ","
" data address = " INTPTR_FORMAT "\n",
cname, dtype, variability(),
units(), dsize, vlen,
pad_length, size, is_on_c_heap() ? "TRUE":"FALSE",
p2i(psmp), p2i(valuep));
// record the start of the entry and the location of the data field.
_pdep = pdep;

View File

@ -1,5 +1,5 @@
/*
* Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2001, 2017, 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
@ -23,6 +23,7 @@
*/
#include "precompiled.hpp"
#include "logging/log.hpp"
#include "memory/allocation.inline.hpp"
#include "runtime/arguments.hpp"
#include "runtime/java.hpp"
@ -92,14 +93,12 @@ void PerfMemory::initialize() {
size_t capacity = align_size_up(PerfDataMemorySize,
os::vm_allocation_granularity());
if (PerfTraceMemOps) {
tty->print("PerfDataMemorySize = " SIZE_FORMAT ","
" os::vm_allocation_granularity = %d,"
" adjusted size = " SIZE_FORMAT "\n",
PerfDataMemorySize,
os::vm_allocation_granularity(),
capacity);
}
log_debug(perf, memops)("PerfDataMemorySize = " SIZE_FORMAT ","
" os::vm_allocation_granularity = %d,"
" adjusted size = " SIZE_FORMAT "\n",
PerfDataMemorySize,
os::vm_allocation_granularity(),
capacity);
// allocate PerfData memory region
create_memory_region(capacity);
@ -124,12 +123,10 @@ void PerfMemory::initialize() {
// the PerfMemory region was created as expected.
if (PerfTraceMemOps) {
tty->print("PerfMemory created: address = " INTPTR_FORMAT ","
" size = " SIZE_FORMAT "\n",
p2i(_start),
_capacity);
}
log_debug(perf, memops)("PerfMemory created: address = " INTPTR_FORMAT ","
" size = " SIZE_FORMAT "\n",
p2i(_start),
_capacity);
_prologue = (PerfDataPrologue *)_start;
_end = _start + _capacity;