You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Pavel Afremov (JIRA)" <ji...@apache.org> on 2007/05/11 17:39:18 UTC

[jira] Created: (HARMONY-3845) [DRLVM] Class unloading support in lazy stack creation.

[DRLVM] Class unloading support in lazy stack creation.
-------------------------------------------------------

                 Key: HARMONY-3845
                 URL: https://issues.apache.org/jira/browse/HARMONY-3845
             Project: Harmony
          Issue Type: New Feature
          Components: DRLVM
            Reporter: Pavel Afremov


Class unloading support in lazy stack creation.

When classes are unloaded, stack traces for all exception should be created, because required information can be unreachable late. Static method "Throwable.createAllStackTraces() "should be called for it.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-3845) [drlvm][exception] Class unloading support in lazy stack creation.

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3845?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12497739 ] 

Alexey Varlamov commented on HARMONY-3845:
------------------------------------------

Pavel, 
Sorry for the delayed reply. 
Regarding the 1st alternative, I'm reading in j.l.Throwable.getStackTrace() javadoc:
"Some virtual machines may, under some circumstances, omit one or more stack frames from the stack trace. In the extreme case, a virtual machine that has no stack trace information concerning this throwable is permitted to return a zero-length array from this method. Generally speaking, the array returned by this method will contain one element for every frame that would be printed by printStackTrace. "
So probably yes, formally we should omit a frame rather than keep it with "???".

In the second alternative, I meant saving pointers to C-structs named "String" (defined in String_Pool.h) which are readily available during stack creation. Looking deeper, Method_Handle is still needed for mapping IP to bc; so I was wrong saying "instead", but "in addition"...

I don't think we should refuse lazy stacks creation, obtaining line numbers is quite costly and should be avoided until really needed.

> [drlvm][exception] Class unloading support in lazy stack creation.
> ------------------------------------------------------------------
>
>                 Key: HARMONY-3845
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3845
>             Project: Harmony
>          Issue Type: New Feature
>          Components: DRLVM
>            Reporter: Pavel Afremov
>         Attachments: 0001-First-version-of-class-unloading-support-implementat.patch, 0002-Tune-class-unloading-support-in-lazy-stack-creation.patch, ExceptionsBenchmark.java
>
>
> Class unloading support in lazy stack creation.
> When classes are unloaded, stack traces for all exception should be created, because required information can be unreachable late. Static method "Throwable.createAllStackTraces() "should be called for it.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-3845) [drlvm][exception] Class unloading support in lazy stack creation.

Posted by "Vladimir Beliaev (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3845?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Vladimir Beliaev updated HARMONY-3845:
--------------------------------------

    Attachment: test-plugin-unloading.zip

Here is the test which may be helpfull (test-plugin-unloading.zip).

It implements the general plugin-like scheme and:
  - create the PluginClassLoader (with finalizer defined)
  - load PluginSublcass (which extends PluginClass & has a finalizer defined)
  - instanciate it through Class.newInstance
  - cast to base class - PluginClass - and load 'init' method (which throws runtime exception)
  - store these exception, set classloader & plugin subclass objects to null
  - call to GC
  - etc...
Ok, it turned out that Bea JRockit keeps ClassLoader object until stored exception is kept. 

And ... Hotspot does not unload ClassLoader at all in this test:

# jrockit
java -showversion TestExcCU
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC: System optimized over throughput (initial strategy singleparpar))
main: PluginClass is created...
PluginSubclass is being initialized...
main: PluginClass.init throwed exception...
main: plugin & classloader are set to NULL...
PluginSubclass is being unloaded...
main: GC is done...: storedException=java.lang.NullPointerException
java.lang.NullPointerException
        at PluginSubclass.init(PluginSubclass.java:5)
        at TestExcCU.main(TestExcCU.java:13)
PluginClassLoader is being unloaded...
main: GC is done...: storedException=null

# Hotspot
java -showversion TestExcCU
java version "1.5.0_06"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)
Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode)
main: PluginClass is created...
PluginSubclass is being initialized...
main: PluginClass.init throwed exception...
main: plugin & classloader are set to NULL...
PluginSubclass is being unloaded...
main: GC is done...: storedException=java.lang.NullPointerException
java.lang.NullPointerException
        at PluginSubclass.init(PluginSubclass.java:5)
        at TestExcCU.main(TestExcCU.java:13)
main: GC is done...: storedException=null


> [drlvm][exception] Class unloading support in lazy stack creation.
> ------------------------------------------------------------------
>
>                 Key: HARMONY-3845
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3845
>             Project: Harmony
>          Issue Type: New Feature
>          Components: DRLVM
>            Reporter: Pavel Afremov
>         Attachments: 0001-First-version-of-class-unloading-support-implementat.patch, 0002-Tune-class-unloading-support-in-lazy-stack-creation.patch, ExceptionsBenchmark.java, test-plugin-unloading.zip
>
>
> Class unloading support in lazy stack creation.
> When classes are unloaded, stack traces for all exception should be created, because required information can be unreachable late. Static method "Throwable.createAllStackTraces() "should be called for it.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-3845) [drlvm][exception] Class unloading support in lazy stack creation.

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3845?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12497859 ] 

Alexey Varlamov commented on HARMONY-3845:
------------------------------------------

Evolving the last idea, we can keep not classes but WeakReferences, and this will be 100% correct indicator of unreachable frames:

class Throwable { 
private StackTraceElement[] stackTrace; //resolved stack 
private transient Object state; //unresolved stack state 
private transient WeakReference<Class>[] frames; //just anchors for Classes in stack, should be nullified after resolving stack state 
... 
} 

So the whole approach is:
1) Create unresolved stack state Object + array of weak references to j.l.Class instances of each frame, this is not expensive.
2) During stack resolution, while iterating frames, check if corresponding Class reference is null - then skip the frame.
2.1) If we keep class&method name as VM-Strings, frame is not skipped but line number is undefined (-1).

> [drlvm][exception] Class unloading support in lazy stack creation.
> ------------------------------------------------------------------
>
>                 Key: HARMONY-3845
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3845
>             Project: Harmony
>          Issue Type: New Feature
>          Components: DRLVM
>            Reporter: Pavel Afremov
>         Attachments: 0001-First-version-of-class-unloading-support-implementat.patch, 0002-Tune-class-unloading-support-in-lazy-stack-creation.patch, ExceptionsBenchmark.java
>
>
> Class unloading support in lazy stack creation.
> When classes are unloaded, stack traces for all exception should be created, because required information can be unreachable late. Static method "Throwable.createAllStackTraces() "should be called for it.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-3845) [drlvm][exception] Class unloading support in lazy stack creation.

Posted by "Rana Dasgupta (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3845?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12524785 ] 

Rana Dasgupta commented on HARMONY-3845:
----------------------------------------

Since we choose to follow the approach in 3997, we need to close this JIRA issue.

> [drlvm][exception] Class unloading support in lazy stack creation.
> ------------------------------------------------------------------
>
>                 Key: HARMONY-3845
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3845
>             Project: Harmony
>          Issue Type: New Feature
>          Components: DRLVM
>            Reporter: Pavel Afremov
>         Attachments: 0001-First-version-of-class-unloading-support-implementat.patch, 0002-Tune-class-unloading-support-in-lazy-stack-creation.patch, ExceptionsBenchmark.java, test-plugin-unloading.zip
>
>
> Class unloading support in lazy stack creation.
> When classes are unloaded, stack traces for all exception should be created, because required information can be unreachable late. Static method "Throwable.createAllStackTraces() "should be called for it.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-3845) [DRLVM] Class unloading support in lazy stack creation.

Posted by "Pavel Afremov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3845?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pavel Afremov updated HARMONY-3845:
-----------------------------------

    Attachment: 0001-First-version-of-class-unloading-support-implementat.patch

First version of class unloading support implementation in lazy stack creation.



> [DRLVM] Class unloading support in lazy stack creation.
> -------------------------------------------------------
>
>                 Key: HARMONY-3845
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3845
>             Project: Harmony
>          Issue Type: New Feature
>          Components: DRLVM
>            Reporter: Pavel Afremov
>         Attachments: 0001-First-version-of-class-unloading-support-implementat.patch
>
>
> Class unloading support in lazy stack creation.
> When classes are unloaded, stack traces for all exception should be created, because required information can be unreachable late. Static method "Throwable.createAllStackTraces() "should be called for it.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-3845) [DRLVM] Class unloading support in lazy stack creation.

Posted by "Pavel Afremov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3845?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12495082 ] 

Pavel Afremov commented on HARMONY-3845:
----------------------------------------

On my machine performance degradation reach 10% in the worst case, and less 1% in the best. 

> [DRLVM] Class unloading support in lazy stack creation.
> -------------------------------------------------------
>
>                 Key: HARMONY-3845
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3845
>             Project: Harmony
>          Issue Type: New Feature
>          Components: DRLVM
>            Reporter: Pavel Afremov
>         Attachments: 0001-First-version-of-class-unloading-support-implementat.patch, 0002-Tune-class-unloading-support-in-lazy-stack-creation.patch, ExceptionsBenchmark.java
>
>
> Class unloading support in lazy stack creation.
> When classes are unloaded, stack traces for all exception should be created, because required information can be unreachable late. Static method "Throwable.createAllStackTraces() "should be called for it.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-3845) [DRLVM] Class unloading support in lazy stack creation.

Posted by "Pavel Afremov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3845?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12496303 ] 

Pavel Afremov commented on HARMONY-3845:
----------------------------------------

Alexey

First alternative isn't OK. "???" strings don't meet spec. 

About second alternative. Could you clarify what you propose?
1.	Save char* strings with stack information in C heap
2.	Creates java Strings without constructor runing.
3.	Turn off lazy stack creation.


> [DRLVM] Class unloading support in lazy stack creation.
> -------------------------------------------------------
>
>                 Key: HARMONY-3845
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3845
>             Project: Harmony
>          Issue Type: New Feature
>          Components: DRLVM
>            Reporter: Pavel Afremov
>         Attachments: 0001-First-version-of-class-unloading-support-implementat.patch, 0002-Tune-class-unloading-support-in-lazy-stack-creation.patch, ExceptionsBenchmark.java
>
>
> Class unloading support in lazy stack creation.
> When classes are unloaded, stack traces for all exception should be created, because required information can be unreachable late. Static method "Throwable.createAllStackTraces() "should be called for it.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-3845) [DRLVM] Class unloading support in lazy stack creation.

Posted by "Pavel Afremov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3845?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12495083 ] 

Pavel Afremov commented on HARMONY-3845:
----------------------------------------

10% and 0.2% performance degradation on the attached  micro benchmark on my machine.

> [DRLVM] Class unloading support in lazy stack creation.
> -------------------------------------------------------
>
>                 Key: HARMONY-3845
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3845
>             Project: Harmony
>          Issue Type: New Feature
>          Components: DRLVM
>            Reporter: Pavel Afremov
>         Attachments: 0001-First-version-of-class-unloading-support-implementat.patch, 0002-Tune-class-unloading-support-in-lazy-stack-creation.patch, ExceptionsBenchmark.java
>
>
> Class unloading support in lazy stack creation.
> When classes are unloaded, stack traces for all exception should be created, because required information can be unreachable late. Static method "Throwable.createAllStackTraces() "should be called for it.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-3845) [drlvm][exception] Class unloading support in lazy stack creation.

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3845?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12497848 ] 

Alexey Varlamov commented on HARMONY-3845:
------------------------------------------

Pavel, I'm afraid you got me a bit wrong.

1) ClassLoader handle can be looked in the static table ClassLoader::m_table, if it not there - it is unloaded. (Not 100% accurate I must admit...)
2) I meant not C-strings but VM-Strings, which provide unique storage for Class & Method names and are never deallocated. No any extra allocation or free needed, just copy of handle. Still there must be a way to detect if class is unloaded to be able to skip native2bc search.

I agree that all approaches have some pros and cons, no ideal solution yet. 

BTW, does RI really unloads classes in such cases? We could just prevent unloading of classes for unresolved stack traces - like keeping an array of j.l.Class refs for frames alongside with unresolved state:
class Throwable {
	private StackTraceElement[] stackTrace; //resolved stack
	private transient Object state;    //unresolved stack state
	private transient Class[] frames;	//just anchors for Classes in stack, should be nullified after resolving stack state
...
}

> [drlvm][exception] Class unloading support in lazy stack creation.
> ------------------------------------------------------------------
>
>                 Key: HARMONY-3845
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3845
>             Project: Harmony
>          Issue Type: New Feature
>          Components: DRLVM
>            Reporter: Pavel Afremov
>         Attachments: 0001-First-version-of-class-unloading-support-implementat.patch, 0002-Tune-class-unloading-support-in-lazy-stack-creation.patch, ExceptionsBenchmark.java
>
>
> Class unloading support in lazy stack creation.
> When classes are unloaded, stack traces for all exception should be created, because required information can be unreachable late. Static method "Throwable.createAllStackTraces() "should be called for it.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (HARMONY-3845) [drlvm][exception] Class unloading support in lazy stack creation.

Posted by "Xiao-Feng Li (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3845?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Xiao-Feng Li closed HARMONY-3845.
---------------------------------

    Resolution: Duplicate

duplicate to HARMONY-3997

> [drlvm][exception] Class unloading support in lazy stack creation.
> ------------------------------------------------------------------
>
>                 Key: HARMONY-3845
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3845
>             Project: Harmony
>          Issue Type: New Feature
>          Components: DRLVM
>            Reporter: Pavel Afremov
>         Attachments: 0001-First-version-of-class-unloading-support-implementat.patch, 0002-Tune-class-unloading-support-in-lazy-stack-creation.patch, ExceptionsBenchmark.java, test-plugin-unloading.zip
>
>
> Class unloading support in lazy stack creation.
> When classes are unloaded, stack traces for all exception should be created, because required information can be unreachable late. Static method "Throwable.createAllStackTraces() "should be called for it.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-3845) [drlvm][exception] Class unloading support in lazy stack creation.

Posted by "Gregory Shimansky (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3845?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gregory Shimansky updated HARMONY-3845:
---------------------------------------

    Summary: [drlvm][exception] Class unloading support in lazy stack creation.  (was: [DRLVM] Class unloading support in lazy stack creation.)

> [drlvm][exception] Class unloading support in lazy stack creation.
> ------------------------------------------------------------------
>
>                 Key: HARMONY-3845
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3845
>             Project: Harmony
>          Issue Type: New Feature
>          Components: DRLVM
>            Reporter: Pavel Afremov
>         Attachments: 0001-First-version-of-class-unloading-support-implementat.patch, 0002-Tune-class-unloading-support-in-lazy-stack-creation.patch, ExceptionsBenchmark.java
>
>
> Class unloading support in lazy stack creation.
> When classes are unloaded, stack traces for all exception should be created, because required information can be unreachable late. Static method "Throwable.createAllStackTraces() "should be called for it.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-3845) [DRLVM] Class unloading support in lazy stack creation.

Posted by "Pavel Afremov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3845?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pavel Afremov updated HARMONY-3845:
-----------------------------------

    Attachment: 0002-Tune-class-unloading-support-in-lazy-stack-creation.patch

Function createAllStackTraces becomes private.


> [DRLVM] Class unloading support in lazy stack creation.
> -------------------------------------------------------
>
>                 Key: HARMONY-3845
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3845
>             Project: Harmony
>          Issue Type: New Feature
>          Components: DRLVM
>            Reporter: Pavel Afremov
>         Attachments: 0001-First-version-of-class-unloading-support-implementat.patch, 0002-Tune-class-unloading-support-in-lazy-stack-creation.patch, ExceptionsBenchmark.java
>
>
> Class unloading support in lazy stack creation.
> When classes are unloaded, stack traces for all exception should be created, because required information can be unreachable late. Static method "Throwable.createAllStackTraces() "should be called for it.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (HARMONY-3845) [DRLVM] Class unloading support in lazy stack creation.

Posted by "Pavel Afremov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HARMONY-3845?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pavel Afremov updated HARMONY-3845:
-----------------------------------

    Attachment: ExceptionsBenchmark.java

Micro bench mark was added to evaluate performance degradation.

> [DRLVM] Class unloading support in lazy stack creation.
> -------------------------------------------------------
>
>                 Key: HARMONY-3845
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3845
>             Project: Harmony
>          Issue Type: New Feature
>          Components: DRLVM
>            Reporter: Pavel Afremov
>         Attachments: 0001-First-version-of-class-unloading-support-implementat.patch, 0002-Tune-class-unloading-support-in-lazy-stack-creation.patch, ExceptionsBenchmark.java
>
>
> Class unloading support in lazy stack creation.
> When classes are unloaded, stack traces for all exception should be created, because required information can be unreachable late. Static method "Throwable.createAllStackTraces() "should be called for it.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-3845) [DRLVM] Class unloading support in lazy stack creation.

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3845?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12496192 ] 

Alexey Varlamov commented on HARMONY-3845:
------------------------------------------

Somewhat encumbered approach IMO, and too heavyweight impl (oversynchronized).
I can think of the following alternatives:
1) To detect if corresponding class is unloaded, keep a pointer to it's ClassLoader in StackTraceFrame. When trace is requested, just look if the ClassLoader is still in ClassLoaderTable and report "??:?" otherwise.
2) Instead of keeping MethodHandle in StackTraceFrame, store class and method name Strings - negligible space overhead and no perf penalty. Even if corresponding class is unloaded, only line information is lost which is acceptable.

> [DRLVM] Class unloading support in lazy stack creation.
> -------------------------------------------------------
>
>                 Key: HARMONY-3845
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3845
>             Project: Harmony
>          Issue Type: New Feature
>          Components: DRLVM
>            Reporter: Pavel Afremov
>         Attachments: 0001-First-version-of-class-unloading-support-implementat.patch, 0002-Tune-class-unloading-support-in-lazy-stack-creation.patch, ExceptionsBenchmark.java
>
>
> Class unloading support in lazy stack creation.
> When classes are unloaded, stack traces for all exception should be created, because required information can be unreachable late. Static method "Throwable.createAllStackTraces() "should be called for it.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-3845) [DRLVM] Class unloading support in lazy stack creation.

Posted by "Alexey Varlamov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3845?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12496193 ] 

Alexey Varlamov commented on HARMONY-3845:
------------------------------------------

BTW, did someone investigate how RI behaves in such case?

> [DRLVM] Class unloading support in lazy stack creation.
> -------------------------------------------------------
>
>                 Key: HARMONY-3845
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3845
>             Project: Harmony
>          Issue Type: New Feature
>          Components: DRLVM
>            Reporter: Pavel Afremov
>         Attachments: 0001-First-version-of-class-unloading-support-implementat.patch, 0002-Tune-class-unloading-support-in-lazy-stack-creation.patch, ExceptionsBenchmark.java
>
>
> Class unloading support in lazy stack creation.
> When classes are unloaded, stack traces for all exception should be created, because required information can be unreachable late. Static method "Throwable.createAllStackTraces() "should be called for it.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (HARMONY-3845) [drlvm][exception] Class unloading support in lazy stack creation.

Posted by "Pavel Afremov (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HARMONY-3845?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12497821 ] 

Pavel Afremov commented on HARMONY-3845:
----------------------------------------

I evaluate you first proposal. The blocker for its implementation is absence of any class ID, which will be unique after class unloading and following class loading. Now Class Handel is just pointer to class structure.

About you second proposal: Allocated memory for C-Strings should be freed when exception collected. So exception should use finalize or other mechanisms for this purpose. I'll be surprised if these mechanisms will be faster than method put from hash map.


> [drlvm][exception] Class unloading support in lazy stack creation.
> ------------------------------------------------------------------
>
>                 Key: HARMONY-3845
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3845
>             Project: Harmony
>          Issue Type: New Feature
>          Components: DRLVM
>            Reporter: Pavel Afremov
>         Attachments: 0001-First-version-of-class-unloading-support-implementat.patch, 0002-Tune-class-unloading-support-in-lazy-stack-creation.patch, ExceptionsBenchmark.java
>
>
> Class unloading support in lazy stack creation.
> When classes are unloaded, stack traces for all exception should be created, because required information can be unreachable late. Static method "Throwable.createAllStackTraces() "should be called for it.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.