Skip to content

Commit

Permalink
Merge
Browse files Browse the repository at this point in the history
  • Loading branch information
lana committed Feb 29, 2012
2 parents 01792f3 + 2346af4 commit 7e709c0
Show file tree
Hide file tree
Showing 94 changed files with 4,110 additions and 433 deletions.
1 change: 1 addition & 0 deletions .hgtags
Original file line number Diff line number Diff line change
Expand Up @@ -148,3 +148,4 @@ e8f03541af27e38aafb619b96863e17f65ffe53b jdk8-b22
7d3720d8c595d1519c31e9ff7366203fc2c61350 jdk8-b24
0071a6d64113a35ba345bb1580c256de5ce17d3e jdk8-b25
6c805d8ed4e5449ea5e4d158c7bdbd7b0b70efd1 jdk8-b26
c51754cddc037b9609e202b9ed38363d8683e7a8 jdk8-b27
1 change: 1 addition & 0 deletions .hgtags-top-repo
Original file line number Diff line number Diff line change
Expand Up @@ -148,3 +148,4 @@ cc771d92284f71765eca14d6d08703c4af254c04 jdk8-b21
1a5f1d6b98d6827cdb529a4abe6e52a886d944f4 jdk8-b24
221a378e06a326f45e5d89e2123cd6323e0181d1 jdk8-b25
2accafff224ae39caf5f532c305251ba624bf2c0 jdk8-b26
1533dfab9903e4edcfead3b0192643f38c418b9b jdk8-b27
1 change: 1 addition & 0 deletions corba/.hgtags
Original file line number Diff line number Diff line change
Expand Up @@ -148,3 +148,4 @@ a11d0062c445d5f36651c78650ab88aa594bcbff jdk8-b22
b98f0e6dddf987df565029a1f58417fc1844c3f3 jdk8-b24
e45d6b406d5f91ff5256a5c82456ab1e7eb8becd jdk8-b25
79f709a099f40c08f76567fa6d813f9009a69826 jdk8-b26
4fffe75e4edd39a2517f10b743941bf94edb143d jdk8-b27
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2011, 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
Expand Down Expand Up @@ -82,6 +82,6 @@ public org.omg.DynamicAny.DynAny create_dyn_any_from_type_code (org.omg.CORBA.Ty
private String[] __ids = { "IDL:omg.org/DynamicAny/DynAnyFactory:1.0" };

public String[] _ids() {
return __ids;
return (String[]) __ids.clone();
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2003, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2011, 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
Expand Down Expand Up @@ -195,6 +195,6 @@ public void from_any (org.omg.CORBA.Any value)
private String[] __ids = { "IDL:omg.org/DynamicAny/DynAny:1.0" };

public String[] _ids() {
return __ids;
return (String[]) __ids.clone();
}
}
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2011, 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
Expand Down Expand Up @@ -138,7 +138,7 @@ public org.omg.CORBA.portable.OutputStream _invoke (String method,

public String[] _ids ()
{
return __ids;
return (String[]) __ids.clone();
}


Expand Down
2 changes: 2 additions & 0 deletions hotspot/.hgtags
Original file line number Diff line number Diff line change
Expand Up @@ -224,3 +224,5 @@ fd3060701216a11c0df6dcd053c6fd7c2b17a42c jdk8-b26
f92a171cf0071ca6c3fa8231d7d570377f8b2f4d hs23-b16
f92a171cf0071ca6c3fa8231d7d570377f8b2f4d hs23-b16
931e5f39e365a0d550d79148ff87a7f9e864d2e1 hs23-b16
3b24e7e01d20ca590d0f86b1222bb7c3f1a2aa2d jdk8-b27
975c4105f1e2ef1190a75b77124033f1fd4290b5 hs24-b01
Original file line number Diff line number Diff line change
Expand Up @@ -648,7 +648,12 @@ else if(cpConstType == JVM_CONSTANT_Long ||
}

public void printValueOn(PrintStream tty) {
tty.print("ConstantPool for " + getPoolHolder().getName().asString());
Oop holder = poolHolder.getValue(this);
if (holder instanceof Klass) {
tty.print("ConstantPool for " + ((Klass)holder).getName().asString());
} else {
tty.print("ConstantPool for partially loaded class");
}
}

public long getObjectSize() {
Expand Down
4 changes: 2 additions & 2 deletions hotspot/make/hotspot_version
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@
# Don't put quotes (fail windows build).
HOTSPOT_VM_COPYRIGHT=Copyright 2011

HS_MAJOR_VER=23
HS_MAJOR_VER=24
HS_MINOR_VER=0
HS_BUILD_NUMBER=16
HS_BUILD_NUMBER=01

JDK_MAJOR_VER=1
JDK_MINOR_VER=8
Expand Down
3 changes: 3 additions & 0 deletions hotspot/make/linux/makefiles/ppc.make
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,6 @@ OPT_CFLAGS/sharedRuntimeTrig.o = $(OPT_CFLAGS/NOOPT)
# Must also specify if CPU is big endian
CFLAGS += -DVM_BIG_ENDIAN

ifdef E500V2
ASFLAGS += -Wa,-mspe -Wa,--defsym -Wa,E500V2=1
endif
20 changes: 20 additions & 0 deletions hotspot/src/cpu/sparc/vm/c1_LIRAssembler_sparc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3231,6 +3231,26 @@ void LIR_Assembler::membar_release() {
// no-op on TSO
}

void LIR_Assembler::membar_loadload() {
// no-op
//__ membar(Assembler::Membar_mask_bits(Assembler::loadload));
}

void LIR_Assembler::membar_storestore() {
// no-op
//__ membar(Assembler::Membar_mask_bits(Assembler::storestore));
}

void LIR_Assembler::membar_loadstore() {
// no-op
//__ membar(Assembler::Membar_mask_bits(Assembler::loadstore));
}

void LIR_Assembler::membar_storeload() {
__ membar(Assembler::Membar_mask_bits(Assembler::StoreLoad));
}


// Pack two sequential registers containing 32 bit values
// into a single 64 bit register.
// src and src->successor() are packed into dst
Expand Down
19 changes: 19 additions & 0 deletions hotspot/src/cpu/x86/vm/c1_LIRAssembler_x86.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3713,6 +3713,25 @@ void LIR_Assembler::membar_release() {
// __ store_fence();
}

void LIR_Assembler::membar_loadload() {
// no-op
//__ membar(Assembler::Membar_mask_bits(Assembler::loadload));
}

void LIR_Assembler::membar_storestore() {
// no-op
//__ membar(Assembler::Membar_mask_bits(Assembler::storestore));
}

void LIR_Assembler::membar_loadstore() {
// no-op
//__ membar(Assembler::Membar_mask_bits(Assembler::loadstore));
}

void LIR_Assembler::membar_storeload() {
__ membar(Assembler::Membar_mask_bits(Assembler::StoreLoad));
}

void LIR_Assembler::get_thread(LIR_Opr result_reg) {
assert(result_reg->is_register(), "check");
#ifdef _LP64
Expand Down
10 changes: 5 additions & 5 deletions hotspot/src/cpu/x86/vm/vm_version_x86.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2012, 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
Expand Down Expand Up @@ -65,8 +65,8 @@ class VM_Version_StubGenerator: public StubCodeGenerator {

address generate_getPsrInfo() {
// Flags to test CPU type.
const uint32_t EFL_AC = 0x40000;
const uint32_t EFL_ID = 0x200000;
const uint32_t HS_EFL_AC = 0x40000;
const uint32_t HS_EFL_ID = 0x200000;
// Values for when we don't have a CPUID instruction.
const int CPU_FAMILY_SHIFT = 8;
const uint32_t CPU_FAMILY_386 = (3 << CPU_FAMILY_SHIFT);
Expand Down Expand Up @@ -100,7 +100,7 @@ class VM_Version_StubGenerator: public StubCodeGenerator {
//
// if we are unable to change the AC flag, we have a 386
//
__ xorl(rax, EFL_AC);
__ xorl(rax, HS_EFL_AC);
__ push(rax);
__ popf();
__ pushf();
Expand All @@ -118,7 +118,7 @@ class VM_Version_StubGenerator: public StubCodeGenerator {
//
__ bind(detect_486);
__ mov(rax, rcx);
__ xorl(rax, EFL_ID);
__ xorl(rax, HS_EFL_ID);
__ push(rax);
__ popf();
__ pushf();
Expand Down
6 changes: 5 additions & 1 deletion hotspot/src/os/bsd/vm/osThread_bsd.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2012, 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
Expand Down Expand Up @@ -49,7 +49,11 @@

void OSThread::pd_initialize() {
assert(this != NULL, "check");
#ifdef __APPLE__
_thread_id = 0;
#else
_thread_id = NULL;
#endif
_pthread_id = NULL;
_siginfo = NULL;
_ucontext = NULL;
Expand Down
25 changes: 22 additions & 3 deletions hotspot/src/os/bsd/vm/osThread_bsd.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 1999, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1999, 2012, 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
Expand Down Expand Up @@ -40,10 +40,17 @@
private:

#ifdef _ALLBSD_SOURCE
// _thread_id and _pthread_id are the same on BSD
// keep both to minimize code divergence in os_bsd.cpp

#ifdef __APPLE__
thread_t _thread_id;
#else
pthread_t _thread_id;
#endif

// _pthread_id is the pthread id, which is used by library calls
// (e.g. pthread_kill).
pthread_t _pthread_id;

#else
// _thread_id is kernel thread id (similar to LWP id on Solaris). Each
// thread has a unique thread_id (BsdThreads or NPTL). It can be used
Expand All @@ -64,9 +71,15 @@
void set_caller_sigmask(sigset_t sigmask) { _caller_sigmask = sigmask; }

#ifdef _ALLBSD_SOURCE
#ifdef __APPLE__
thread_t thread_id() const {
return _thread_id;
}
#else
pthread_t thread_id() const {
return _thread_id;
}
#endif
#else
pid_t thread_id() const {
return _thread_id;
Expand All @@ -84,9 +97,15 @@
}
#endif // ASSERT
#ifdef _ALLBSD_SOURCE
#ifdef __APPLE__
void set_thread_id(thread_t id) {
_thread_id = id;
}
#else
void set_thread_id(pthread_t id) {
_thread_id = id;
}
#endif
#else
void set_thread_id(pid_t id) {
_thread_id = id;
Expand Down
40 changes: 37 additions & 3 deletions hotspot/src/os/bsd/vm/os_bsd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,25 @@ void os::init_system_properties_values() {
sprintf(ld_library_path, "%s:%s", v, t);
free(t);
}

#ifdef __APPLE__
// Apple's Java6 has "." at the beginning of java.library.path.
// OpenJDK on Windows has "." at the end of java.library.path.
// OpenJDK on Linux and Solaris don't have "." in java.library.path
// at all. To ease the transition from Apple's Java6 to OpenJDK7,
// "." is appended to the end of java.library.path. Yes, this
// could cause a change in behavior, but Apple's Java6 behavior
// can be achieved by putting "." at the beginning of the
// JAVA_LIBRARY_PATH environment variable.
{
char *t = ld_library_path;
// that's +3 for appending ":." and the trailing '\0'
ld_library_path = (char *) malloc(strlen(t) + 3);
sprintf(ld_library_path, "%s:%s", t, ".");
free(t);
}
#endif

Arguments::set_library_path(ld_library_path);
}

Expand Down Expand Up @@ -979,8 +998,13 @@ static void *java_start(Thread *thread) {
}

#ifdef _ALLBSD_SOURCE
#ifdef __APPLE__
// thread_id is mach thread on macos
osthread->set_thread_id(::mach_thread_self());
#else
// thread_id is pthread_id on BSD
osthread->set_thread_id(::pthread_self());
#endif
#else
// thread_id is kernel thread id (similar to Solaris LWP id)
osthread->set_thread_id(os::Bsd::gettid());
Expand Down Expand Up @@ -1171,7 +1195,11 @@ bool os::create_attached_thread(JavaThread* thread) {

// Store pthread info into the OSThread
#ifdef _ALLBSD_SOURCE
#ifdef __APPLE__
osthread->set_thread_id(::mach_thread_self());
#else
osthread->set_thread_id(::pthread_self());
#endif
#else
osthread->set_thread_id(os::Bsd::gettid());
#endif
Expand Down Expand Up @@ -1788,7 +1816,13 @@ size_t os::lasterror(char *buf, size_t len) {
return n;
}

intx os::current_thread_id() { return (intx)pthread_self(); }
intx os::current_thread_id() {
#ifdef __APPLE__
return (intx)::mach_thread_self();
#else
return (intx)::pthread_self();
#endif
}
int os::current_process_id() {

// Under the old bsd thread library, bsd gives each thread
Expand Down Expand Up @@ -5133,9 +5167,9 @@ jlong os::thread_cpu_time(Thread *thread, bool user_sys_cpu_time) {
struct thread_basic_info tinfo;
mach_msg_type_number_t tcount = THREAD_INFO_MAX;
kern_return_t kr;
mach_port_t mach_thread;
thread_t mach_thread;

mach_thread = pthread_mach_thread_np(thread->osthread()->thread_id());
mach_thread = thread->osthread()->thread_id();
kr = thread_info(mach_thread, THREAD_BASIC_INFO, (thread_info_t)&tinfo, &tcount);
if (kr != KERN_SUCCESS)
return -1;
Expand Down
12 changes: 9 additions & 3 deletions hotspot/src/os_cpu/bsd_x86/vm/vmStructs_bsd_x86.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2000, 2012, 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
Expand Down Expand Up @@ -29,12 +29,18 @@
// constants required by the Serviceability Agent. This file is
// referenced by vmStructs.cpp.

#ifdef __APPLE__
#define OS_THREAD_ID_TYPE thread_t
#else
#define OS_THREAD_ID_TYPE pthread_t
#endif

#define VM_STRUCTS_OS_CPU(nonstatic_field, static_field, unchecked_nonstatic_field, volatile_nonstatic_field, nonproduct_nonstatic_field, c2_nonstatic_field, unchecked_c1_static_field, unchecked_c2_static_field, last_entry) \
\
/******************************/ \
/* Threads (NOTE: incomplete) */ \
/******************************/ \
nonstatic_field(OSThread, _thread_id, pthread_t) \
nonstatic_field(OSThread, _thread_id, OS_THREAD_ID_TYPE) \
nonstatic_field(OSThread, _pthread_id, pthread_t) \
/* This must be the last entry, and must be present */ \
last_entry()
Expand All @@ -46,7 +52,7 @@
/* Posix Thread IDs */ \
/**********************/ \
\
declare_integer_type(pid_t) \
declare_unsigned_integer_type(thread_t) \
declare_unsigned_integer_type(pthread_t) \
\
/* This must be the last entry, and must be present */ \
Expand Down
1 change: 1 addition & 0 deletions hotspot/src/share/vm/c1/c1_Canonicalizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -908,3 +908,4 @@ void Canonicalizer::do_UnsafePrefetchWrite(UnsafePrefetchWrite* x) {}
void Canonicalizer::do_ProfileCall(ProfileCall* x) {}
void Canonicalizer::do_ProfileInvoke(ProfileInvoke* x) {}
void Canonicalizer::do_RuntimeCall(RuntimeCall* x) {}
void Canonicalizer::do_MemBar(MemBar* x) {}
1 change: 1 addition & 0 deletions hotspot/src/share/vm/c1/c1_Canonicalizer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ class Canonicalizer: InstructionVisitor {
virtual void do_ProfileCall (ProfileCall* x);
virtual void do_ProfileInvoke (ProfileInvoke* x);
virtual void do_RuntimeCall (RuntimeCall* x);
virtual void do_MemBar (MemBar* x);
};

#endif // SHARE_VM_C1_C1_CANONICALIZER_HPP
Loading

0 comments on commit 7e709c0

Please sign in to comment.