United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6498391 Remove all dead code related to the legacy vm_suspend/vm_resume API's
JDK-6498391 : Remove all dead code related to the legacy vm_suspend/vm_resume API's

Details
Type:
Bug
Submit Date:
2006-11-29
Status:
Closed
Updated Date:
2012-10-08
Project Name:
JDK
Resolved Date:
2007-01-17
Component:
hotspot
OS:
generic
Sub-Component:
runtime
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:
hs10 (b06)

Related Reports
Backport:
Backport:
Relates:

Sub Tasks

Description
The legacy vm_suspend/vm_resume API used to be used for a number of purposes in the VM, including safepoints and profiling. This usage has been deprecated over time and as of Java 6 (at least) there remains only one usage of this API: on linux, if the flat-profiler is profiling the VMThread then get_thread_pc is called and that uses vm_suspend.

Despite barely being used there is code related to vm_suspend/vm_resume scattered throughout the VM. Getting rid of this dead code will make the codebase easier to understand and maintain, might even improve performance in some places, and enables future simplification of other "entangled" code pertaining to the use of the SR_lock (which will end up being used only for the java-suspend mechanism).

The linux suspend/resume mechanism based on signals will be kept for use by the flat-profiler, and will be fixed, as presently the signal handler assumes it is called on a JavaThread when it never is. If you use "-Xprof -XX:+ProfileVM" on a linux fastdebug build you will get an assertion failure in the handler. Other unnecessary code in the linux suspend/resume code pertains to a mutex acquisition problem which has not existed for some time. In fact the use of the safe_mutex_lock/safe_cond_wait wrappers can be removed.

                                    

Comments
EVALUATION

See description
                                     
2006-11-29



Hardware and Software, Engineered to Work Together