14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "iphlp_interface.hpp"
27 #include "logging/log.hpp"
28 #include "memory/allocation.inline.hpp"
29 #include "memory/resourceArea.hpp"
30 #include "pdh_interface.hpp"
31 #include "runtime/os_perf.hpp"
32 #include "runtime/os.hpp"
33 #include "utilities/macros.hpp"
34 #include "vm_version_ext_x86.hpp"
35 #include <math.h>
36 #include <psapi.h>
37 #include <TlHelp32.h>
38
39 /*
40 * Windows provides a vast plethora of performance objects and counters,
41 * consumption of which is assisted using the Performance Data Helper (PDH) interface.
42 * We import a selected few api entry points from PDH, see pdh_interface.hpp.
43 *
44 * The code located in this file is to a large extent an abstraction over much of the
45 * plumbing needed to start consuming an object and/or counter of choice.
46 *
47 */
48
49 /*
50 * How to use:
51 * 1. Create query
52 * 2. Add counters to the query
53 * 3. Collect the performance data using the query
54 * 4. Display the performance data using the counters associated with the query
|
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 *
23 */
24
25 #include "precompiled.hpp"
26 #include "iphlp_interface.hpp"
27 #include "logging/log.hpp"
28 #include "memory/allocation.inline.hpp"
29 #include "memory/resourceArea.hpp"
30 #include "pdh_interface.hpp"
31 #include "runtime/os_perf.hpp"
32 #include "runtime/os.hpp"
33 #include "utilities/macros.hpp"
34 #include CPU_HEADER(vm_version_ext)
35 #include <math.h>
36 #include <psapi.h>
37 #include <TlHelp32.h>
38
39 /*
40 * Windows provides a vast plethora of performance objects and counters,
41 * consumption of which is assisted using the Performance Data Helper (PDH) interface.
42 * We import a selected few api entry points from PDH, see pdh_interface.hpp.
43 *
44 * The code located in this file is to a large extent an abstraction over much of the
45 * plumbing needed to start consuming an object and/or counter of choice.
46 *
47 */
48
49 /*
50 * How to use:
51 * 1. Create query
52 * 2. Add counters to the query
53 * 3. Collect the performance data using the query
54 * 4. Display the performance data using the counters associated with the query
|