hotspot/src/share/vm/prims/whitebox.hpp
changeset 27917 c5937f7b4e8b
parent 27642 8c9eff693145
child 28042 40ce95bcdc78
equal deleted inserted replaced
27916:6db2a04e72b1 27917:c5937f7b4e8b
    25 #ifndef SHARE_VM_PRIMS_WHITEBOX_HPP
    25 #ifndef SHARE_VM_PRIMS_WHITEBOX_HPP
    26 #define SHARE_VM_PRIMS_WHITEBOX_HPP
    26 #define SHARE_VM_PRIMS_WHITEBOX_HPP
    27 
    27 
    28 #include "prims/jni.h"
    28 #include "prims/jni.h"
    29 
    29 
       
    30 #include "utilities/exceptions.hpp"
    30 #include "memory/allocation.hpp"
    31 #include "memory/allocation.hpp"
    31 #include "oops/oopsHierarchy.hpp"
    32 #include "oops/oopsHierarchy.hpp"
    32 #include "oops/symbol.hpp"
    33 #include "oops/symbol.hpp"
    33 #include "runtime/interfaceSupport.hpp"
    34 #include "runtime/interfaceSupport.hpp"
    34 
    35 
    54     }                                                                  \
    55     }                                                                  \
    55   } while (0)
    56   } while (0)
    56 
    57 
    57 class CodeBlob;
    58 class CodeBlob;
    58 class CodeHeap;
    59 class CodeHeap;
       
    60 class JavaThread;
    59 
    61 
    60 class WhiteBox : public AllStatic {
    62 class WhiteBox : public AllStatic {
    61  private:
    63  private:
    62   static bool _used;
    64   static bool _used;
    63  public:
    65  public:
    66   static void set_used() { _used = true; }
    68   static void set_used() { _used = true; }
    67   static int offset_for_field(const char* field_name, oop object,
    69   static int offset_for_field(const char* field_name, oop object,
    68     Symbol* signature_symbol);
    70     Symbol* signature_symbol);
    69   static const char* lookup_jstring(const char* field_name, oop object);
    71   static const char* lookup_jstring(const char* field_name, oop object);
    70   static bool lookup_bool(const char* field_name, oop object);
    72   static bool lookup_bool(const char* field_name, oop object);
    71   static void force_sweep();
    73   static void sweeper_thread_entry(JavaThread* thread, TRAPS);
       
    74   static JavaThread* create_sweeper_thread(TRAPS);
    72   static int get_blob_type(const CodeBlob* code);
    75   static int get_blob_type(const CodeBlob* code);
    73   static CodeHeap* get_code_heap(int blob_type);
    76   static CodeHeap* get_code_heap(int blob_type);
    74   static CodeBlob* allocate_code_blob(int blob_type, int size);
    77   static CodeBlob* allocate_code_blob(int blob_type, int size);
    75   static int array_bytes_to_length(size_t bytes);
    78   static int array_bytes_to_length(size_t bytes);
    76   static void register_methods(JNIEnv* env, jclass wbclass, JavaThread* thread,
    79   static void register_methods(JNIEnv* env, jclass wbclass, JavaThread* thread,