harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "chunrong lai" <chunrong...@gmail.com>
Subject Re: [jira] Created: (HARMONY-4511) [drlvm][jvmti][gc] GC_gen doesn't collect tagged objects
Date Tue, 24 Jul 2007 05:39:43 GMT
When reading the code of:

 void TITags::enumerate() {
    tag_pair_list::iterator i;
    for (i = tags.begin(); i != tags.end(); i++) {
        // (2) false = not pinned,
        // (3) true = "long" weak root = reset after finalization
        gc_add_weak_root_set_entry(&i->obj, false, true);
    }
}

 I see the comment of "true = "long" weak root = reset after finalization"
but actually "true" would mean "short" weak root for GC.


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?
>
>
>
> 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
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message