×

Method and apparatus for loading classes and re-organizing class archives

  • US 9,477,496 B2
  • Filed: 02/26/2009
  • Issued: 10/25/2016
  • Est. Priority Date: 02/27/2008
  • Status: Active Grant
First Claim
Patent Images

1. A method for loading a class to a virtual machine, comprising:

  • separating, using a separator module, each of a plurality of classes of a class archive into a skeleton, contents, and an index file having references to the contents associated with the skeleton of each class;

    organizing the class archive before class loading such that the organized class archive includes a class contraction portion and a rest portion, wherein the class contraction portion comprises a plurality of skeletons, one skeleton for each class, and the rest portion comprises a plurality of contents, one content for each corresponding skeleton;

    verifying a security of the class archive using a security verification module, wherein verification comprises loading and carrying out verification of a plurality of symbolic references except a verification of bytecodes on a loaded skeleton;

    loading only the class contraction portion of the class archive to the virtual machine using a load tracker;

    wherein the class contraction portion comprises only a basic class information portion of each of the plurality of classes in the class archive and the rest portion comprises a detailed class information portion of each of the plurality of classes that is not included in the class contraction portion, andwherein the basic class information consists of a magic code, a major version number, a minor version number, a count of constants, a constant pool and access flags and wherein the detailed class information comprises variables, methods and attributes and counts thereof;

    executing a program using the class archive at the virtual machine;

    loading, during runtime using a load tracker, a plurality of needed contents not loaded prior to executing the program;

    recording class usage information at runtime using a run recorder, wherein the class usage information comprises one or more of a miss rate of skeletons or contents, missed skeletons or contents and a non-usage rate of skeletons or contents, the missed skeletons or contents being recorded in a first-in first-out manner using a storage space with a fixed size; and

    optimizing the class archive by removing a plurality of unused skeletons during runtime from the class contraction portion of the class archive, and adding a plurality of contents loaded during runtime to the class contraction portion of the class archive.

View all claims
  • 1 Assignment
Timeline View
Assignment View
    ×
    ×