This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: class initialization check overhead


Jeff Sturm <jsturm@one-point.com> writes:
> Or are you suggesting something like PROT_NONE, as in a guard page?

Whoops, yes, that's what I meant.  Would this work?

Is ensuring that you never have two classes on the same page difficult
or too memory-consuming?


> This writes NOP instructions over the original call.

Wow, that's cool, but still kinda scary.  Self-modifying code... =)

Could _Jv_InitClass be re-jiggered to perform all the register saves
itself (rather than asking the caller to do it)?  In other words, put
a PUSHALL at the beginning and a POPALL at the end?


> If the frontend knows that a class invokes no <clinit> method
> (directly or in a superclass), could the _Jv_InitClass be dropped
> entirely?

Or perhaps give gcj a list of classes that you know will be referenced
eventually, and have it run those <clinit>s immediately upon startup.
You'd have to have a way to figure out the dependency tree... is there
enough information at runtime to do this?  If not, this would either
require modifications to the linker, which is probably a bad idea.

  - a


-- 
"Through your rags I see your vanity"  -- Socrates


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]