hotspot/src/share/vm/compiler/compileBroker.hpp
changeset 33168 20f107826ae8
parent 33160 c59f1676d27e
child 33451 0712796e4039
child 33593 60764a78fa5c
equal deleted inserted replaced
33167:6437daa39853 33168:20f107826ae8
    46     };
    46     };
    47 
    47 
    48   private:
    48   private:
    49 
    49 
    50     char _current_method[cmname_buffer_length];
    50     char _current_method[cmname_buffer_length];
    51     PerfStringVariable* _perf_current_method;
       
    52 
       
    53     int  _compile_type;
    51     int  _compile_type;
    54     PerfVariable* _perf_compile_type;
       
    55 
       
    56     PerfCounter* _perf_time;
       
    57     PerfCounter* _perf_compiles;
       
    58 
    52 
    59   public:
    53   public:
    60     CompilerCounters(const char* name, int instance, TRAPS);
    54     CompilerCounters();
    61 
    55 
    62     // these methods should be called in a thread safe context
    56     // these methods should be called in a thread safe context
    63 
    57 
    64     void set_current_method(const char* method) {
    58     void set_current_method(const char* method) {
    65       strncpy(_current_method, method, (size_t)cmname_buffer_length-1);
    59       strncpy(_current_method, method, (size_t)cmname_buffer_length-1);
    66       _current_method[cmname_buffer_length-1] = '\0';
    60       _current_method[cmname_buffer_length-1] = '\0';
    67       if (UsePerfData) _perf_current_method->set_value(method);
       
    68     }
    61     }
    69 
    62 
    70     char* current_method()                  { return _current_method; }
    63     char* current_method()                  { return _current_method; }
    71 
    64 
    72     void set_compile_type(int compile_type) {
    65     void set_compile_type(int compile_type) {
    73       _compile_type = compile_type;
    66       _compile_type = compile_type;
    74       if (UsePerfData) _perf_compile_type->set_value((jlong)compile_type);
       
    75     }
    67     }
    76 
    68 
    77     int compile_type()                       { return _compile_type; }
    69     int compile_type()                       { return _compile_type; }
    78 
    70 
    79     PerfCounter* time_counter()              { return _perf_time; }
       
    80     PerfCounter* compile_counter()           { return _perf_compiles; }
       
    81 };
    71 };
    82 
    72 
    83 // CompileQueue
    73 // CompileQueue
    84 //
    74 //
    85 // A list of CompileTasks.
    75 // A list of CompileTasks.