This is the mail archive of the java-patches@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: [RFC] Number of insn slots used for method compilation


Tom Tromey wrote:
Keith> Other than adding a variable to hold this information (a la the
Keith> attached patch), is there another way that won't require using any
Keith> more memory? I don't think that code_length can safely be changed to
Keith> store this information.

Actually, I think it would be safe to update this. After compiling a
method we don't use it any more, do we?
I don't think we use it at present. However, the JDWP ByteCodes command provides access to the original bytecode for the method, so we need access to code_length somehow in order to implement that.

An alternative that would possibly save memory would be to perhaps simply re-parse the method attributes from the underlying bytecode when the ByteCodes op is used. Since this is used only by debuggers, performance isn't going to be an issue. But, of course, it'll be easier to implement by adding a separate field, and the extra memory consumption won't be all that significant in the context of the whole runtime.

Bryce


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