harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Varlamov (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-3845) [drlvm][exception] Class unloading support in lazy stack creation.
Date Tue, 22 May 2007 12:58:16 GMT

    [ 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.


Mime
View raw message