hotspot/src/share/vm/runtime/perfData.hpp
changeset 32614 b7b2407bc7e5
parent 27680 8ecc0871c18e
child 34195 89011d12ebd3
equal deleted inserted replaced
32613:73bec9f941d7 32614:b7b2407bc7e5
     1 /*
     1 /*
     2  * Copyright (c) 2001, 2013, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2001, 2015, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.
     7  * published by the Free Software Foundation.
   666   private:
   666   private:
   667     static PerfDataList* _all;
   667     static PerfDataList* _all;
   668     static PerfDataList* _sampled;
   668     static PerfDataList* _sampled;
   669     static PerfDataList* _constants;
   669     static PerfDataList* _constants;
   670     static const char* _name_spaces[];
   670     static const char* _name_spaces[];
       
   671     static volatile bool _has_PerfData;
   671 
   672 
   672     // add a PerfData item to the list(s) of know PerfData objects
   673     // add a PerfData item to the list(s) of know PerfData objects
   673     static void add_item(PerfData* p, bool sampled);
   674     static void add_item(PerfData* p, bool sampled);
   674 
   675 
   675   protected:
   676   protected:
   867                                        PerfSampleHelper* sh, TRAPS) {
   868                                        PerfSampleHelper* sh, TRAPS) {
   868       return create_long_counter(ns, name, u, sh, THREAD);
   869       return create_long_counter(ns, name, u, sh, THREAD);
   869     }
   870     }
   870 
   871 
   871     static void destroy();
   872     static void destroy();
       
   873     static bool has_PerfData() { return _has_PerfData; }
   872 };
   874 };
   873 
   875 
   874 // Useful macros to create the performance counters
   876 // Useful macros to create the performance counters
   875 #define NEWPERFTICKCOUNTER(counter, counter_ns, counter_name)  \
   877 #define NEWPERFTICKCOUNTER(counter, counter_ns, counter_name)  \
   876   {counter = PerfDataManager::create_counter(counter_ns, counter_name, \
   878   {counter = PerfDataManager::create_counter(counter_ns, counter_name, \