mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-18 10:04:42 +02:00
8247289: Obsolete unused UseBsdPosixThreadCPUClocks
8247292: Obsolete unused UseOprofile flag on BSD Co-authored-by: Christoph Dreis <christoph.dreis@freenet.de> Reviewed-by: hseigel, dcubed
This commit is contained in:
parent
23e2f27996
commit
0be5b7d66e
3 changed files with 5 additions and 45 deletions
|
@ -36,15 +36,7 @@
|
||||||
diagnostic_pd, \
|
diagnostic_pd, \
|
||||||
notproduct, \
|
notproduct, \
|
||||||
range, \
|
range, \
|
||||||
constraint) \
|
constraint)
|
||||||
\
|
|
||||||
product(bool, UseOprofile, false, \
|
|
||||||
"enable support for Oprofile profiler") \
|
|
||||||
\
|
|
||||||
/* NB: The default value of UseBsdPosixThreadCPUClocks may be */ \
|
|
||||||
/* overridden in Arguments::parse_each_vm_init_arg. */ \
|
|
||||||
product(bool, UseBsdPosixThreadCPUClocks, true, \
|
|
||||||
"enable fast Bsd Posix clocks where available") \
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Defines Bsd-specific default values. The flags are available on all
|
// Defines Bsd-specific default values. The flags are available on all
|
||||||
|
|
|
@ -1879,42 +1879,6 @@ int os::vm_allocation_granularity() {
|
||||||
return os::Bsd::page_size();
|
return os::Bsd::page_size();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Rationale behind this function:
|
|
||||||
// current (Mon Apr 25 20:12:18 MSD 2005) oprofile drops samples without executable
|
|
||||||
// mapping for address (see lookup_dcookie() in the kernel module), thus we cannot get
|
|
||||||
// samples for JITted code. Here we create private executable mapping over the code cache
|
|
||||||
// and then we can use standard (well, almost, as mapping can change) way to provide
|
|
||||||
// info for the reporting script by storing timestamp and location of symbol
|
|
||||||
void bsd_wrap_code(char* base, size_t size) {
|
|
||||||
static volatile jint cnt = 0;
|
|
||||||
|
|
||||||
if (!UseOprofile) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
char buf[PATH_MAX + 1];
|
|
||||||
int num = Atomic::add(&cnt, 1);
|
|
||||||
|
|
||||||
snprintf(buf, PATH_MAX + 1, "%s/hs-vm-%d-%d",
|
|
||||||
os::get_temp_directory(), os::current_process_id(), num);
|
|
||||||
unlink(buf);
|
|
||||||
|
|
||||||
int fd = ::open(buf, O_CREAT | O_RDWR, S_IRWXU);
|
|
||||||
|
|
||||||
if (fd != -1) {
|
|
||||||
off_t rv = ::lseek(fd, size-2, SEEK_SET);
|
|
||||||
if (rv != (off_t)-1) {
|
|
||||||
if (::write(fd, "", 1) == 1) {
|
|
||||||
mmap(base, size,
|
|
||||||
PROT_READ|PROT_WRITE|PROT_EXEC,
|
|
||||||
MAP_PRIVATE|MAP_FIXED|MAP_NORESERVE, fd, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
::close(fd);
|
|
||||||
unlink(buf);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
static void warn_fail_commit_memory(char* addr, size_t size, bool exec,
|
static void warn_fail_commit_memory(char* addr, size_t size, bool exec,
|
||||||
int err) {
|
int err) {
|
||||||
warning("INFO: os::commit_memory(" INTPTR_FORMAT ", " SIZE_FORMAT
|
warning("INFO: os::commit_memory(" INTPTR_FORMAT ", " SIZE_FORMAT
|
||||||
|
|
|
@ -548,6 +548,10 @@ static SpecialFlag const special_jvm_flags[] = {
|
||||||
{ "SharedReadOnlySize", JDK_Version::undefined(), JDK_Version::jdk(10), JDK_Version::undefined() },
|
{ "SharedReadOnlySize", JDK_Version::undefined(), JDK_Version::jdk(10), JDK_Version::undefined() },
|
||||||
{ "SharedMiscDataSize", JDK_Version::undefined(), JDK_Version::jdk(10), JDK_Version::undefined() },
|
{ "SharedMiscDataSize", JDK_Version::undefined(), JDK_Version::jdk(10), JDK_Version::undefined() },
|
||||||
{ "SharedMiscCodeSize", JDK_Version::undefined(), JDK_Version::jdk(10), JDK_Version::undefined() },
|
{ "SharedMiscCodeSize", JDK_Version::undefined(), JDK_Version::jdk(10), JDK_Version::undefined() },
|
||||||
|
#ifdef BSD
|
||||||
|
{ "UseBsdPosixThreadCPUClocks", JDK_Version::undefined(), JDK_Version::jdk(16), JDK_Version::jdk(17) },
|
||||||
|
{ "UseOprofile", JDK_Version::undefined(), JDK_Version::jdk(16), JDK_Version::jdk(17) },
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef TEST_VERIFY_SPECIAL_JVM_FLAGS
|
#ifdef TEST_VERIFY_SPECIAL_JVM_FLAGS
|
||||||
// These entries will generate build errors. Their purpose is to test the macros.
|
// These entries will generate build errors. Their purpose is to test the macros.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue