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/globalDefinitions.hpp"
34 #include "utilities/macros.hpp"
35 #include "vm_version_ext_x86.hpp"
36 #include <math.h>
37 #include <psapi.h>
38 #include <TlHelp32.h>
39
40 /*
41 * Windows provides a vast plethora of performance objects and counters,
42 * consumption of which is assisted using the Performance Data Helper (PDH) interface.
43 * We import a selected few api entry points from PDH, see pdh_interface.hpp.
44 *
45 * The code located in this file is to a large extent an abstraction over much of the
46 * plumbing needed to start consuming an object and/or counter of choice.
47 *
48 */
49
50 /*
51 * How to use:
52 * 1. Create query
53 * 2. Add counters to the query
54 * 3. Collect the performance data using the query
55 * 4. Display the performance data using the counters associated with the query
|
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/globalDefinitions.hpp"
34 #include "utilities/macros.hpp"
35 #include CPU_HEADER(vm_version_ext)
36 #include <math.h>
37 #include <psapi.h>
38 #include <TlHelp32.h>
39
40 /*
41 * Windows provides a vast plethora of performance objects and counters,
42 * consumption of which is assisted using the Performance Data Helper (PDH) interface.
43 * We import a selected few api entry points from PDH, see pdh_interface.hpp.
44 *
45 * The code located in this file is to a large extent an abstraction over much of the
46 * plumbing needed to start consuming an object and/or counter of choice.
47 *
48 */
49
50 /*
51 * How to use:
52 * 1. Create query
53 * 2. Add counters to the query
54 * 3. Collect the performance data using the query
55 * 4. Display the performance data using the counters associated with the query
|