public inbox for java-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "Boehm, Hans" <hans.boehm@hp.com>
To: "David Daney" <ddaney@avtrex.com>, <tromey@redhat.com>
Cc: "Andrew Haley" <aph@redhat.com>,
		"Bryce McKinlay" <mckinlay@redhat.com>,
		"Robert Schuster" <theBohemian@gmx.net>,
	<java-patches@gcc.gnu.org>
Subject: RE: FYI: Linker & Verifier fixes (really GC mark procedures)
Date: Sat, 04 Feb 2006 01:18:00 -0000	[thread overview]
Message-ID: <65953E8166311641A685BDF71D8658266C1BD6@cacexc12.americas.cpqcorp.net> (raw)

> This is slightly off topic, but could you put the bitmap 
> descriptor as 
> the last field in the Class object?  Then make a variable length bit 
> string with the high (or perhaps low) order bit indicating if 
> there was 
> another segment of bit string following?
> 
> One word of bit string would mark the first 31 (or 63) 
> fields, then if 
> the high bit were set there would be another word for the next 31 (or 
> 63) fields...
> 
Theoretically it could.  But it doesn't match well with the way the GC
does things.  And I also don't think it would be a measurable win.

The GC understands descriptor words associated with an entire page of
objects.  That word may be a descriptor that tells the GC to look in the
object itself for the real descriptor, or to indirect twice through a
"vtable pointer" to find it.  This is all reasonably clean so long as
all descriptors fit in a word.  (Actually it's unclean in one very
subtle respect, which might get even more complicated with
variable-length descriptors.  The issue has to do with false pointers to
objects with garbage descriptors.)

The reason for doing all of this, instead of just calling mark
procedures from the collector, is largely to avoid a procedure call (and
associated startup costs dealing with got-tables, etc.) for every marked
object.  The only place it fails is for objects that are longer than 30
or 62 words long and don't qualify for a length descriptor.  But those
generally require enough work to trace that the procedure call is likely
to be in the noise anyway.

So long as we get the mark procedure(s) to behave correctly, I think
we're fine.  Class objects aren't likely to make up a large fraction of
the heap anyway, I hope.

Hans

             reply	other threads:[~2006-02-04  1:18 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-04  1:18 Boehm, Hans [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-02-01 18:22 Boehm, Hans
2006-02-01 18:43 ` Andrew Haley
2006-02-01 19:39   ` Bryce McKinlay
2006-02-01 19:44   ` Tom Tromey
2006-02-01 19:56     ` Andrew Haley
2006-02-01 20:09       ` Bryce McKinlay
2006-02-02 12:22         ` Andrew Haley
2006-02-03  1:22     ` Tom Tromey
2006-02-03  5:30       ` Hans Boehm
2006-02-03 16:56         ` Tom Tromey
2006-02-03 17:07           ` David Daney
2006-02-03 17:53       ` Bryce McKinlay
2006-02-03 18:09         ` David Daney
2006-02-03 18:12           ` Andrew Haley
2006-02-03 19:38           ` Bryce McKinlay
2006-02-01 19:42 ` Tom Tromey

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=65953E8166311641A685BDF71D8658266C1BD6@cacexc12.americas.cpqcorp.net \
    --to=hans.boehm@hp.com \
    --cc=aph@redhat.com \
    --cc=ddaney@avtrex.com \
    --cc=java-patches@gcc.gnu.org \
    --cc=mckinlay@redhat.com \
    --cc=theBohemian@gmx.net \
    --cc=tromey@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).