harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Xiao-Feng Li" <xiaofeng...@gmail.com>
Subject Re: [jira] Created: (HARMONY-4511) [drlvm][jvmti][gc] GC_gen doesn't collect tagged objects
Date Tue, 24 Jul 2007 12:14:10 GMT
Gregory, there are a couple of native resources in VM that have Java
objects associated, such as fat lock, classes, etc. They can have
different solutions based on their characteristics. I need think more
on the tagged object GC support.

Thanks,
xiaofeng

On 7/24/07, Gregory Shimansky <gshimansky@gmail.com> wrote:
> Xiao-Feng Li wrote:
> > On 7/23/07, Alexei Fedotov <alexei.fedotov@gmail.com> wrote:
> >> Folks,
> >>
> >> > These object references are enumerated as weak
> >>
> >> There might be a coincidence with the message Harmony VM continues to
> >> print:
> >> The GC did not provide gc_add_weak_root_set_entry()
> >>
> >> When we just got GC v4 before Salikh implemented weak roots they
> >> counted as strong ones and were not collectable. Xiaofeng, does it
> >> make sense?
> >
> > We need discuss if this makes sense to use weak root for tagged
> > objects, or whether we have better solutions.
>
> It seems to be a convenient way to keep a reference to an object that
> wouldn't keep it from being collected, so it does make sense to me.
>
> Other solution would be to allocate tags inside of objects themself
> inside of heap, but there is a big problem with it because spec states
> that tags are local to JVMTI environment. If an agent creates many
> environments, or if there is more than JVMTI agent, it may be necessary
> to associate different environments with the same object.
>
> >> On 7/23/07, Gregory Shimansky <gshimansky@gmail.com> wrote:
> >> > Xiao-Feng Li wrote:
> >> > > Eugene, what are tagged objects? are they non-reachable objects?
> >> >
> >> > Tags are JVMTI attributes that may be assigned to an object using
> >> > SetTag() JVMTI function. These attributes may be used by heap profiler
> >> > to analyze it. Tagged objects may be reachable or not, those that
> >> aren't
> >> > reachable should be collected by GC. Take a look at JVMTI spec section
> >> > that describes heap iteration API [2].
> >> >
> >> > In JVMTI code tags to objects are implemented as a pair of jlong and
> >> > object reference. These object references are enumerated as weak (see
> >> > file jvmti_tags.cpp) using gc_add_weak_root_set_entry() so GC should
> >> not
> >> > have a problem removing unreachable objects.
> >> >
> >> > [1] http://java.sun.com/j2se/1.5.0/docs/guide/jvmti/jvmti.html#SetTag
> >> > [2] http://java.sun.com/j2se/1.5.0/docs/guide/jvmti/jvmti.html#Heap
> >> >
> >> > > On 7/21/07, Eugene S. Ostrovsky (JIRA) <jira@apache.org> wrote:
> >> > >> [drlvm][jvmti][gc] GC_gen doesn't collect tagged objects
> >> > >> --------------------------------------------------------
> >> > >>
> >> > >>                  Key: HARMONY-4511
> >> > >>                  URL:
> >> https://issues.apache.org/jira/browse/HARMONY-4511
> >> > >>              Project: Harmony
> >> > >>           Issue Type: Bug
> >> > >>           Components: DRLVM
> >> > >>          Environment: Windows x86
> >> > >>             Reporter: Eugene S. Ostrovsky
> >> > >>
> >> > >>
> >> > >> Objects tagged with SetTag() jvmti function are not collected
by
> >> GC v5.
> >> > >> I'm not sure whether the bug is in GC or in jvmti heap iteration
> >> > >> implementaion.
> >> > >>
> >> > >>
> >> > >> --
> >> > >> This message is automatically generated by JIRA.
> >> > >> -
> >> > >> You can reply to this email to add a comment to the issue online.
> >> > >>
> >> > >>
> >> > >
> >> > >
> >> >
> >> >
> >> > --
> >> > Gregory
> >> >
> >> >
> >>
> >>
> >> --
> >> With best regards,
> >> Alexei,
> >> ESSD, Intel
> >>
> >
> >
>
>
> --
> Gregory
>
>


-- 
http://xiao-feng.blogspot.com

Mime
View raw message