WO2000046664A2 - Instrumentation de chaines de classes - Google Patents
Instrumentation de chaines de classes Download PDFInfo
- Publication number
- WO2000046664A2 WO2000046664A2 PCT/US2000/001079 US0001079W WO0046664A2 WO 2000046664 A2 WO2000046664 A2 WO 2000046664A2 US 0001079 W US0001079 W US 0001079W WO 0046664 A2 WO0046664 A2 WO 0046664A2
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- class
- streamed
- virtual machine
- streamed element
- processed
- Prior art date
Links
- 239000000872 buffer Substances 0.000 claims abstract description 49
- 238000000034 method Methods 0.000 claims abstract description 46
- 238000012545 processing Methods 0.000 claims abstract description 38
- 238000013507 mapping Methods 0.000 claims description 8
- 230000008569 process Effects 0.000 abstract description 9
- 230000004044 response Effects 0.000 abstract description 4
- 238000003860 storage Methods 0.000 description 10
- 230000008901 benefit Effects 0.000 description 6
- 230000006870 function Effects 0.000 description 4
- 238000013459 approach Methods 0.000 description 3
- 230000006855 networking Effects 0.000 description 3
- 238000003491 array Methods 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 2
- 238000005282 brightening Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 230000007246 mechanism Effects 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 230000004308 accommodation Effects 0.000 description 1
- 238000013475 authorization Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000005520 cutting process Methods 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000003111 delayed effect Effects 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 238000001914 filtration Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000007639 printing Methods 0.000 description 1
- 230000001131 transforming effect Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
Definitions
- the present invention relates generally to systems and methods for processing data, and more particularly to systems and methods for executing, instrumenting, and otherwise processing program code and data for transmission to a virtual machine.
- the Internet has motivated millions of people worldwide to use computers.
- Electronic mail (e-mail)
- E-mail is a reason that many businesses and individuals first buy a computer or connect their computers to a network.
- E-mail is typically communicated across the Internet to recipients across town, across the country, or across the globe.
- Other Internet-based tools that have significantly contributed to the use of computers and computer networks include the World Wide Web and related web browsers.
- the World Wide Web is comprised of millions of virtual web pages comprised of program code and data. Such web pages are physically stored on a server computer connected to the Internet.
- To browse a web page a user generally inputs into the web browser an address (e.g.
- a Universal Resource Locator (URL) associated with the web page.
- a server on which the specified web page is located transmits program code and data associated with the web page to the browser computer ("the client").
- the web browser includes software modules capable of executing or otherwise processing the program code and data for the web page. Typically, this processing causes a graphical or textual representation of the web page to be displayed on the client monitor.
- Java is a programming language that has close ties to Smalltalk and C++, and its primary purpose was to be a cross-platform, distributed, network- based language.
- Java provides a complete programming environment that provides basic services (like graphics and networking), allowing application developers to obtain needed services from Java itself, as opposed to the operating system.
- programs that need access to graphics, network services and data storage for example, must use a function call provided as part of the base-level operating system (e.g., MS-DOS or UNIX) installed on the client computer.
- Java provides a built-in run-time entity called a "virtual machine" (or "VM”) to provide such basic services.
- VM virtual machine
- Java is also interpreted, which means that unlike C++ or FORTRAN source code, Java source code does not get compiled directly to machine instructions. Instead, Java's source code gets compiled into an intermediate form called byte- codes.
- a compiler takes the text strings that make up a Java source code program and translates these strings into Java byte-codes. These byte-codes are platform-independent and, therefore, can be sent to and executed by various client computer platforms.
- an interpreter (which is typically part of the web browser) reads each byte-code as it is received at the client computer and translates the byte-codes into the appropriate machine code for execution on the client system.
- a class is a programming data structure within which a programmer can group an object's data with methods that operate on that data.
- the data within a window class might include the window's size and position coordinates.
- the methods within the window class might include functions that display, size, and move the window.
- streamed elements are preferably stored at the server and transmitted to the client when a Java program is invoked.
- the top level of the Java program is referred to as the "main class” and typically includes references to other classes required to establish the functionality of the Java program. These reference classes may also reference additional classes in a class reference hierarchy.
- the main class and all reference classes are streamed from a server to a client, where the Java program is executed.
- a class loader preferably receives the streamed elements in an input stream and loads them in a cache or buffer until requested by the client's virtual machine.
- An important feature in many class loaders is the ability to receive a single archive file that contains many classes, such as a zip file or a Java archive (JAR) file.
- Archive files have significant advantages over individual class files. For example, loading several classes in a single archive file and streaming that single archive file to a client in a single network connection can be orders of magnitude faster than loading those same classes through individual connections, primarily because establishing multiple connections with the server (one for each transmitted class) is time-consuming. Hence, archive files are often preferred because they can greatly reduce the time required to download a Java program to a client.
- archive files however, has some disadvantages also. For example, if the Java program comprises a large number of classes in an archive file, the entire archive file (i.e. all of the streamed elements in the archive file) must be downloaded in a single connection with the server (i.e., a single input stream). Consequently, execution of the Java program is delayed until the entire archive file is downloaded. Even in web browsers in which you can specify multiple archive files for a single Java program, a class loader has no way of knowing which particular archive files contain needed classes, so it must still load all of the referenced archive files at once.
- instrumenting may be employed. Instrumenting generally involves modifying a class file to contain, for example, new byte-code instructions in existing methods, new fields, or new methods.
- a disadvantage of existing instrumenting methods is that existing class loaders download a class into a buffer or cache before modifying the class. When the streamed class is included in an archive, the class loader typically must wait until the entire archive is downloaded before instrumenting occurs. This approach introduces undesirable delay in the instrumenting process and requires excessive resources. Consequently, a need exists for a more efficient instrumenting system and method. Summary of the Invention
- a system embodiment for instrumenting a class to be passed to a virtual machine may comprise a map array including a first reference and a second reference. The first reference is mapped to the second reference.
- a class processor has access to the map array modifies the class in accordance with the map array.
- a buffer coupled to the class processor stores the modified class concurrent to passage of the modified class to the virtual machine.
- the present invention may also comprise a system for processing a streamed element to be passed to a virtual machine.
- a processor processes the streamed element as the streamed element is received.
- a buffer stores the processed streamed element.
- a notification module responsive to a request for the streamed element from the virtual machine notifies the virtual machine when the streamed element is available.
- the present invention may also comprise a method for processing a streamed element to be passed to a virtual machine.
- a streamed element is received into a first processor via an input stream.
- the streamed element is modified as the first processor receives the streamed element.
- the modified streamed element is stored the streamed element into a buffer.
- the present invention may also comprise a program product for processing a streamed element to be passed to a virtual machine.
- the program product comprises instructions for receiving the streamed element into a first processor via an input stream.
- the streamed element is modified as the first processor receives the streamed element.
- the modified streamed element is stored into a buffer.
- Figure 1 depicts a general purpose computer that implements the logical operations of an embodiment of the present invention.
- Figure 2 depicts an embodiment of a class loader system in accordance with the present invention.
- Figure 3 depicts a detailed diagram of a class loader system in accordance with the present invention.
- Figure 4 depicts an exemplary class streamed in from a server in accordance with the present invention.
- Figure 5 depicts an exemplary map array in accordance with the present invention.
- Figure 6 depicts an exemplary class map array in accordance with the present invention.
- Figure 7 depicts a flowchart for operations of processing a streamed element to be passed through a virtual machine in accordance with the present invention.
- Figure 8 depicts the flowchart of operations for processing virtual machine requests for a streamed element in accordance with the present invention.
- Figure 9 depicts a flowchart of operations for servicing virtual machine requests as an archive file is being received in an input stream in accordance with the present invention.
- Figure 1 depicts a general purpose computer capable of executing a program product embodiment of the present invention.
- One operating environment in which the present invention is potentially useful encompasses the general purpose computer.
- data and program files may be input to the computer, which reads the files and executes the programs therein.
- Some of the elements of a general purpose computer are shown in Figure 1 wherein a processor 101 is shown having an input/output (I/O) section 102, a Central Processing Unit (CPU) 103, and a memory section 104.
- the present invention is optionally implemented in software devices loaded in memory 104 and/or stored on a configured CD-ROM 108 or storage unit 109 thereby transforming the computer system in Figure 1 to a special purpose machine for implementing the present invention.
- the I/O section 102 is connected to keyboard 105, display unit 106, disk storage unit 109, and disk drive unit 107.
- the disk drive unit 107 is a CD-ROM driver unit capable of reading the CD-ROM medium 108, which typically contains programs 110 and data.
- Computer program products containing mechanisms to effectuate the systems and methods in accordance with the present invention may reside in the memory section 104, on a disk storage unit 109, or on the CD-ROM medium 108 of such a system.
- disk drive unit 107 may be replaced or supplemented by a floppy drive unit, a tape drive unit, or other storage medium drive unit.
- the network adapter 111 is capable of connecting the computer system to a network via the network link 112.
- mapping arrays and class and resource data may be stored on disk storage unit 109, disk drive unit 107 or other storage medium units coupled to the system.
- FIG. 2 depicts an embodiment of a class loader system in accordance with the present invention.
- the server 200 is preferably a networked file server or application server coupled to the computer network 202, such as an extranet, an intranet or the Internet. Generally, such a computer network supports TCP/IP networking.
- a client system 204 is also coupled to the computer network 202. Among other components, client system 204 includes the class loader 206 and the virtual machine 208.
- a local device 210 and network device 212 are also coupled to the client system 204.
- the local device 210 may be internal or external to the client system 204 and may include, for example, a storage medium or a peripheral.
- the network device 212 represents a device coupled to the client system 204 by way of the computer network 216, which may include, for example, an intranet, an extranet, the Internet, or another type of local area and wide area network.
- the network device 212 may include, for example, a network server, a networked storage medium, a network peripheral, and other network devices.
- the class loader 206 is a mechanism by which files containing Java byte- codes are read into the Java virtual machine 208 and converted into class definitions.
- the operation of Java programs depends on the class loader, which also works in conjunction with the system's security manager and access controller to provide most of the protection associated with a Java system.
- a class loader is passed a fully qualified class name, and it is expected to return the class object that represents the requested class.
- the class loader is responsible for loading the class bytes-codes from another source (e.g., from the network).
- a class loader is required to cache the classes that it has previously loaded, so that when it is asked to load a particular class, it is not supposed to re-read the class file from the other source.
- the caching of previously loaded class may be implemented by the class loader, by the virtual machine, or by other means; however, the base ClassLoader class (as provided in the Java Development Kit 1.1 and greater) now performs this caching automatically: A class is put into the cache of the ClassLoader in the defineClass method and may be retrieved from the cache with the findLoadedClass method.
- a class object is a variable that has a class type, which programmers often refer to as an instance of the class.
- Java programs define objects in terms of a class, which defines the data that the class object will store and the functions (or methods) that operate on that data.
- a programmer creates a program, he or she writes instructions that work with different things, such as variables or files.
- such things are represented as class objects, and the Java program operates on the objects to achieve a desired functionality. For example, given a file class object, a program might perform such operations a reading, writing, or printing the file class object.
- the caching functionality relates directly to the loading of a Java archive file by the class loader because the archived files are typically loaded in bulk and stored into the cache or buffer 214. Once the classes in the archive file are stored in the buffer 214, the virtual machine can ask for a cached class, and the class loader can return the corresponding class object based on the cached class, rather than waiting for the class loader to re-read the class from the server.
- the class loader 206 modifies loaded classes as they stream into the client system 204 from the server 200 and stores the instrumented classes in the buffer 214. As discussed with regard to Figures 3 and 4, significant advantage exists in instrumenting the streaming classes as they are received and before storing them in the buffer 214.
- the class loader 206 processes requests from the virtual machine as the class elements of an archive file are streaming into class loader 206. Consequently, if the virtual machine 208 requests class A from the class loader 206, and class A has already been loaded into the buffer 214, the class loader 206 transmits the class object corresponding to the cached class A to the virtual machine 208. Alternatively, if class A is not already loaded in the buffer 214, the class loader records the name of the requested class in a pending request queue and continues processing classes in the archive file as they stream.
- the class is preferably stored in the buffer 214 as other classes continue to stream into the class loader 206, and concurrently, the corresponding class object is preferably passed to the virtual machine 208.
- “concurrently” does not require “simultaneous" storage of the class and passage of the class object.
- the virtual machine 208 can execute the Java program using the requested class A object without waiting until the entire archive file to be loaded by the ClassLoader 206 from the server 200.
- FIG. 3 depicts a detailed diagram of a class loader system in accordance with the present invention.
- the class loader 303 preferably includes a redirector 302 and at least one processor.
- the illustrated class loader system includes a class processor (i.e., an instrumenter), a resource processor 310 for graphics data and a resource processor 312 for video data.
- resource processors may exist for other resources, such as audio data, or for specific resource formats, such as JPG, .GIF, .WAV, and .AVI files.
- streamed elements e.g., streamed element 301 are received by the class loader 303 via link 300 from an application server or other source.
- the redirector 302 receives the streamed elements and directs them in an input stream to appropriate processors in accordance with their associated types.
- the redirector 302 determines the type of the streamed element by evaluating a suffix on the streamed element file (i.e., in this embodiment, the type of the streamed element file is a preinformed criterion). For example, a streamed element having a ".class” suffix is redirected to class processor 308. In contrast, streamed elements having a "JPG" suffix are redirected to the resource processor 310, and streamed elements having a ".AVI" suffix are redirected to the resource processor 312. This redirection supports multiple processors for processing multiple types of streamed elements in a single class loader.
- the class processor 308 preferably instruments the received classes (e.g., class 343) as they are received.
- a key to understanding an instrumenting process is the format of the received class file 343.
- a class file is described in Chapter 4 as containing a single ClassFile structure:
- ClassFile ⁇ u4 magic; u2 minor version; u2 major version; u2 constant_pool_count; cp info constant__pool [constant_pool_count- 1 ] ; u2 access flags; u2 this_class; u2 superclass; u2 interfaces_count; u2 interfaces[interfaces_count] ; u2 fields count field info fields [fields_count] ; u2 methods_count; method info methods [methods_count] ; u2 attributes_count; attribute_info attributes [attributes_count] ;
- the labels "u2" and "u4" identify the type of the component fields (such as
- the constant _pool array is an array of variable-length structures representing various string constants, class names, field names, and other constants that are referred to within the ClassFile structure and its substructures.
- Each of the constant_pool array entries at indices 1 through constant _pool_count- 7 is a variable length structure whose format is indicated by its first "tag” byte.
- constants having a CONSTANT_utf8 (string constant) type are processed, although other constant types, such as numeric constants, may also be processed in accordance with the present invention.
- a class is received by the class loader in an input stream of bytes. Accordingly, processor 308 can locate specific component fields within the received class using the ClassFile structure as a guide. Preferably, to instrument a class, the processor 308 searches for class name constants in the constant _pool of the input stream for the received class and replaces them with new class name constants, thereby mapping them to new class references.
- the class references are represented by class name constants in the constant _pool.
- a map array 307 and a class map array 304 provide a predetermined mapping from an old class name constant to a new class name constant (see also Figures 5 and 6 for an example of a map array and a class map array).
- the class map array 304 is generated from the map array 307.
- only one map array is used to provide the necessary mapping of class name constant.
- the generator module 350 can dynamically generate or modify the map array in accordance with a predetermined criterion.
- a class processor can instrument class differently depending on when (e.g., time of day, day of month, etc.) the Java program is downloaded.
- the criterion can be based on which server or client is involved in the download, which user is logged into the server or client, or the relative loads or other characteristics of the server or associated systems coupled to the server.
- the processor 308 reads the first constant value in the constant _pool of the received class and searches for a match with a constant in the "Old Constant" column of the class map array 304. If a match is found, the constant value is replaced with the corresponding (i.e., mapped) constant in the "New Constant" column of the class map array 304 (or map array 307).
- the instrumented class preferably references new or enhanced functionality as provided by the enhanced class object referenced by the new constant. That is, when the instrumented class object is later executed in the virtual machine 305, processing proceeds to the enhanced class instead of the originally referenced class.
- the enhanced classes referenced by the new constants are already loaded into the virtual machine by the virtual machine's internal class loader (by way of the CLASSPATH variable), although the enhanced class may alternatively be loaded from other local or networked sources.
- the class is defined and preferably passed as a class object into a class buffer or cache 306 for storage until requested by the virtual machine ("VM") 305.
- the VM request for a class object is preferably received by a notification module 328 in the class loader 303.
- the VM request is generally based on the references in other classes already loaded into the virtual machine 305.
- the notification module 328 locates the requested class in the class buffer 306, and passes it to the virtual machine 305.
- the notification module includes a hash table software object that locates the requested class in the buffer
- the resource processors 310 and 312 function in a manner similar to the class processor 308 in that resources are preferably redirected to the appropriate processor by redirector 302.
- the resource processors are capable of modifying or otherwise processing the received resource and storing the resulting, processed resource into a resource buffer (such as resource buffer 316) for transmission to the virtual machine 305. Examples of such processing may include without modifying and analyzing the streamed element or triggering another process based on receipt of said streamed element.
- Multiple resource processors, such as processors 310 and 312 can utilize separate or combined resource buffers to store modified resources.
- notification modules 326 and 324 handle requests for resources for processors 310 and 312, respectively.
- notification functionality for multiple or all processors may be performed by a single notification module.
- a graphics file 345 is received by the resource processor 310, which for example performs image processing (e.g., brightening light tones) or converts the image into a different graphics format (e.g., JPG to GIF format), and a video file 347 is received by resource processor 312, which for example performs image processing (e.g., cutting the frame rate or brightening light tones) or converts the image into a different video format (e.g., AVI to MOV format).
- the modified resource is then stored in a resource buffer, such as the resource buffer 316.
- Class and resource processing can provide content filtering. For example, offensive language text can be located within classes and replaced with inoffensive language or flagged to a parent, teacher, or system administrator. In a similar manner, resources can be monitored to filter offensive content. For example, image resources can be scanned for specific signatures or particular color distributions or patterns. Identified resources can be deleted or replaced by other resources, or a signal can be sent to a parent, teacher, or system administrator.
- class processing can provide encryption capabilities. For example, a generic Java-based email application that lacks encryption capabilities can be instrumented to support encryption as it is streamed from a server on the Internet. Furthermore, software licensing authorization can be instrumented into a Java program as it is streamed from a server on the Internet.
- Figure 4 depicts an exemplary class 400 streamed in from a server in accordance with the present invention.
- the initial portion of a ClassFile structure includes fields such as magic, major version, and minor _version, and is represented as the region 402 of the class 400.
- the region 406 represents the portion of the ClassFile structure including access Jlags through attributes.
- a processor in accordance with the present invention preferably processes the constant _pool_count and constant _pool fields of the ClassFile structure, as represented by region 404. As shown, the constant _pool is typically only a small portion of the entire class.
- the streaming instrumentation of an embodiment of the present invention has performance advantages over a non-streaming implementation, where a single class or archive file is downloaded into a buffer and then instrumented, or instrumented in response to a request from a virtual machine.
- a significant bottleneck in loading class for use by a virtual machine is the communication of each class over the network.
- a streaming instrumentation it is often possible to start instrumenting a class it streams into the class loader and to finish instrumenting before the entire class has streamed in from the server. Consequently, a streaming instrumentation in accordance with the present invention can often result in a net zero delay in the receipt of each class into the class buffer.
- the class 400 requires 1.0 second to download completely from a network, including 0.1 seconds to download the region 402.
- An instrumenter in accordance with the present invention can completely instrument the class in 0.6 seconds. Accordingly, there is no net delay introduced by the instrumenter.
- Other optional implementations are contemplated where an instrumenter can modify other regions of a class (e.g., op codes in methods located in region 406). Such implementations can still take advantage of the streaming instrumentation, although the chances of introducing a net delay in the download process increase as the processing occurs later in the byte- code stream.
- a non-streaming implementation requires the download and instrumenting to be handled sequentially (i.e., downloaded for 1.0 seconds into a class buffer and then instrumented for an additional 0.6 seconds for a total of 1.6 seconds).
- FIG. 5 depicts an exemplary map array in accordance with the present invention.
- both class name constants and string constants are mapped for replacement.
- a class name constant has an "L" prefix and a ";" suffix for representing a method signature reference in a class.
- a processor can select a constant (e.g., a class name constant or a string constant) from the constant pool, search for a match with an element in the "Old Constant" column of the map array, and then replace the located string with the corresponding element in the "New Constant" column of map array.
- a string constant containing expletives can be replaced with a non-offensive string constant, or an original class name constant can be replaced with a new class name constant to reference a class having enhanced functionality.
- Figure 6 depicts an exemplary class map array in accordance with the present invention.
- the rows of the map array of Figure 5 are filtered into a class map array to include only class name constants.
- Non-class name constants (such as string constants) are reflected as empty rows in the map array.
- the "L" prefix and the ";" suffix of each class name are stripped to represent a parent class name constant.
- each string constant in the constant _pool of a received ClassFile structure is evaluated against the "Old Constant" entries of one or both of the map arrays of Figures 5 and 6.
- FIG. 7 depicts a flowchart for a method of processing a streamed element to be passed through a virtual machine in accordance with the present invention.
- Operation 700 maps old references to new references in a map array, such as one or both of the examples shown in Figures 5 and 6.
- Operation 702 receives a streamed element, preferably a class, a resource or an archive file, via a network.
- Operation 704 passes the streamed element for processing according to its type as the streamed element is received.
- Processing proceeds to operation 706 if the streamed element is of type "resource". Examples of type "resource” can include without limitation JPG, .GIF, .AVI, and .MOV files.
- Processing proceeds to operation 712 if the streamed element is of type "class".
- Other redirections according to type or content are contemplated within the scope of the present invention.
- Operation 706 processes the streamed class according to program code accessible by the resource processor.
- a resource processor can include program code to convert a JPG file into a .GIF file.
- the processed stream element e.g., the newly converted .GIF file
- the class loader notifies the virtual machine that the processed streamed element is available, preferably in response to a request for the streamed element by the virtual machine.
- Operation 712 locates a constant in the constant pool of the class being received by the class processor that matches an old constant in the map array.
- the old constant in the constant pool is replaced with the corresponding new constant from the map array as the class is received.
- operation 714 can modify other portions of the class, including changing op codes in methods, adding new methods, etc. Preferably, all necessary changes in the constant _pool or in any other portion of the class are completed before the class is entirely streamed into the class loader.
- the modified class is stored in a buffer.
- Operation 718 notifies the virtual machine that a class is available, in response to a request the class from the virtual machine. Operation 718 may be performed relative to a class already stored in the buffer when the request is made, or alternatively, if the class is not yet available, operation 718 waits until the class is received by the class loader. As discussed with regard to Figures 8 and 9, if operation 718 waits, the pending request is placed in a pending request queue until the class is received and made available to the virtual machine.
- FIG. 8 depicts the flowchart of operations for processing virtual machine requests for a streamed element in accordance with the present invention.
- Operation 800 receives a virtual machine request for a streamed element (e.g., a class or a resource) from a virtual machine.
- Operation 802 attempts to locate the requested streamed element in a buffer (e.g., a class buffer or a resource buffer). It is possible that the requested streamed element has not yet been stored in a buffer. For example, if the class loader is downloading an archive file containing multiple classes, the virtual machine may request a class in the archive that is not yet streamed into the class loader. Therefore, the requested class is not yet available for passage to the virtual machine.
- a buffer e.g., a class buffer or a resource buffer
- operation 804 it is determined whether the requested streamed element is available in the buffer. If the requested streamed element is available in the buffer, operation 810 notifies the virtual machine that the requested streamed element is available and operation 812 passes the requested streamed element to the virtual machine. Alternatively, if the requested streamed element is not available in the buffer, operation 806 puts the virtual machine request for the class in a pending request queue. In operation 808, the thread handling the virtual machine request waits until the requested streamed element is available in the buffer. Processing then proceeds to operation 810 where the virtual machine is notified that the requested streamed element is available. Alternatively, operation 808 monitors the streamed elements received by the class loader as they are received, and notifies the virtual machine that the requested streamed element is available. This alternative approach preferably avoids repeatedly searching the class buffer for requested classes in the pending request queue.
- FIG. 9 depicts a flowchart of a method for servicing virtual machine requests as an archive file is being received in an input stream in accordance with the present invention.
- Operation 900 receives a streamed element from an archive stream, such as a JAR file or a zip file.
- the streamed element is processed as it is received. That is, for example, a class is instrumented, or a graphics resource is converted to a different format.
- the processed streamed element is stored in a buffer.
- Decision operation 906 determines whether the streamed element is identified in the pending request queue. If the streamed element is identified in the pending request queue, operation 908 notifies the virtual machine that the streamed element is available.
- Decision block 910 determines whether more streamed elements are streaming from the archive stream. If so, processing returns to operation 900 to receive the next streamed element from the archive stream. Otherwise, processing proceeds to block 912 to wait for further streamed elements or virtual machine requests. While the method disclosed herein has been described and shown with reference to particular operations performed in a particular order, it will be understood that these operations may be combined, subdivided, or reordered to form an equivalent method without departing from the teachings of the present invention. Accordingly, unless specifically indicated herein, the order in grouping of the operations is not limitations of the present invention.
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
- Devices For Executing Special Programs (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
AU33464/00A AU3346400A (en) | 1999-02-05 | 2000-01-18 | Instrumenting streamed classes |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
US24547299A | 1999-02-05 | 1999-02-05 | |
US09/245,472 | 1999-02-05 |
Publications (2)
Publication Number | Publication Date |
---|---|
WO2000046664A2 true WO2000046664A2 (fr) | 2000-08-10 |
WO2000046664A3 WO2000046664A3 (fr) | 2000-12-07 |
Family
ID=22926797
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/US2000/001079 WO2000046664A2 (fr) | 1999-02-05 | 2000-01-18 | Instrumentation de chaines de classes |
Country Status (2)
Country | Link |
---|---|
AU (1) | AU3346400A (fr) |
WO (1) | WO2000046664A2 (fr) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
FR2835329A1 (fr) * | 2002-01-30 | 2003-08-01 | Koninkl Philips Electronics Nv | Procede de traitement de fichiers binaires de programmes |
WO2002041145A3 (fr) * | 2000-11-20 | 2004-02-26 | Zucotto Wireless Inc | Systeme et procede pour la simplification de codes mobiles d'execution dans les langages independants d'une plate-forme |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH03288934A (ja) * | 1990-04-05 | 1991-12-19 | Fujitsu Ltd | 仮想計算機システムにおけるデータ転送制御方式 |
US5349682A (en) * | 1992-01-31 | 1994-09-20 | Parallel Pcs, Inc. | Dynamic fault-tolerant parallel processing system for performing an application function with increased efficiency using heterogeneous processors |
EP0866612B1 (fr) * | 1996-09-11 | 2003-11-12 | Matsushita Electric Industrial Co., Ltd. | Appareil de reception/d'execution de programme pouvant commencer l'execution d'un programme meme lorsque seulement une partie du programme est re ue, et emetteur de programme destine a cet appareil |
MY126363A (en) * | 1996-10-25 | 2006-09-29 | Gemalto Sa | Using a high level programming language with a microcontroller |
US6105071A (en) * | 1997-04-08 | 2000-08-15 | International Business Machines Corporation | Source and destination initiated interrupt system for message arrival notification |
-
2000
- 2000-01-18 AU AU33464/00A patent/AU3346400A/en not_active Abandoned
- 2000-01-18 WO PCT/US2000/001079 patent/WO2000046664A2/fr active Application Filing
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2002041145A3 (fr) * | 2000-11-20 | 2004-02-26 | Zucotto Wireless Inc | Systeme et procede pour la simplification de codes mobiles d'execution dans les langages independants d'une plate-forme |
FR2835329A1 (fr) * | 2002-01-30 | 2003-08-01 | Koninkl Philips Electronics Nv | Procede de traitement de fichiers binaires de programmes |
EP1335284A1 (fr) * | 2002-01-30 | 2003-08-13 | Koninklijke Philips Electronics N.V. | Procédé de traitement de fichiers binaires de programmes |
Also Published As
Publication number | Publication date |
---|---|
WO2000046664A3 (fr) | 2000-12-07 |
AU3346400A (en) | 2000-08-25 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP1076290B1 (fr) | Méthode pour charger et exécuter une application de réseau sur demande | |
US6470494B1 (en) | Class loader | |
US6295643B1 (en) | Method and apparatus for improving java virtual machine performance using persistent execution information | |
CN1113290C (zh) | 为应用程序透明地加载只读存储器中的资源的系统和方法 | |
US6305012B1 (en) | Method and apparatus for dynamic selection of instructions for compiling using tags | |
US6654954B1 (en) | Computer system, program product and method utilizing executable file with alternate program code attached as a file attribute | |
US6490585B1 (en) | Cellular multiprocessor data warehouse | |
US6697835B1 (en) | Method and apparatus for high speed parallel execution of multiple points of logic across heterogeneous data sources | |
US5937411A (en) | Method and apparatus for creating storage for java archive manifest file | |
US6012068A (en) | Media manager for access to multiple media types | |
EP1011043B1 (fr) | Procédé et appareil pour charger une application Java | |
US5884097A (en) | Data structure and methods for defining and using attribute data blocks to instantiate objects and describe changes to objects | |
US7093243B2 (en) | Software mechanism for efficient compiling and loading of java server pages (JSPs) | |
US6637025B1 (en) | Dynamic selection/definition of which class/methods should or should not be jit'ed using information stored in a jar file | |
US6442558B1 (en) | Mechanisms for division, storage, reconstruction, generation, and delivery of java class files | |
US20040019596A1 (en) | Method, system, and program for making objects available for access to a client over a network | |
US6941552B1 (en) | Method and apparatus to retain applet security privileges outside of the Java virtual machine | |
US20030167355A1 (en) | Application program interface for network software platform | |
CA2255035C (fr) | Outil d'archivage | |
CA2347523A1 (fr) | Procede et dispositif d'optimisation automatique d'un programme informatique | |
KR20000053113A (ko) | 정보 장치 아키텍쳐 | |
JP2002207697A (ja) | Htmlフォーム・エレメントを動的に表示するシステムおよび方法 | |
US20050086237A1 (en) | Shared queues in shared object space | |
US7539973B2 (en) | Object type-declaration prefix syntax | |
US7234137B2 (en) | Method, system, and program for processing objects in a distributed computing environment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
AK | Designated states |
Kind code of ref document: A2 Designated state(s): AE AL AM AT AT AU AZ BA BB BG BR BY CA CH CN CR CU CZ CZ DE DE DK DK DM EE EE ES FI FI GB GD GE GH GM HR HU ID IL IN IS JP KE KG KP KR KR KZ LC LK LR LS LT LU LV MA MD MG MK MN MW MX NO NZ PL PT RO RU SD SE SG SI SK SK SL TJ TM TR TT TZ UA UG UZ VN YU ZA ZW |
|
AL | Designated countries for regional patents |
Kind code of ref document: A2 Designated state(s): GH GM KE LS MW SD SL SZ TZ UG ZW AM AZ BY KG KZ MD RU TJ TM AT BE CH CY DE DK ES FI FR GB GR IE IT LU MC NL PT SE BF BJ CF CG CI CM GA GN GW ML MR NE SN TD TG |
|
121 | Ep: the epo has been informed by wipo that ep was designated in this application | ||
DFPE | Request for preliminary examination filed prior to expiration of 19th month from priority date (pct application filed before 20040101) | ||
AK | Designated states |
Kind code of ref document: A3 Designated state(s): AE AL AM AT AT AU AZ BA BB BG BR BY CA CH CN CR CU CZ CZ DE DE DK DK DM EE EE ES FI FI GB GD GE GH GM HR HU ID IL IN IS JP KE KG KP KR KR KZ LC LK LR LS LT LU LV MA MD MG MK MN MW MX NO NZ PL PT RO RU SD SE SG SI SK SK SL TJ TM TR TT TZ UA UG UZ VN YU ZA ZW |
|
AL | Designated countries for regional patents |
Kind code of ref document: A3 Designated state(s): GH GM KE LS MW SD SL SZ TZ UG ZW AM AZ BY KG KZ MD RU TJ TM AT BE CH CY DE DK ES FI FR GB GR IE IT LU MC NL PT SE BF BJ CF CG CI CM GA GN GW ML MR NE SN TD TG |
|
REG | Reference to national code |
Ref country code: DE Ref legal event code: 8642 |
|
122 | Ep: pct application non-entry in european phase |