81
82
83 #include <windows.h>
84 #include <sys/types.h>
85 #include <sys/stat.h>
86 #include <sys/timeb.h>
87 #include <objidl.h>
88 #include <shlobj.h>
89
90 #include <malloc.h>
91 #include <signal.h>
92 #include <direct.h>
93 #include <errno.h>
94 #include <fcntl.h>
95 #include <io.h>
96 #include <process.h> // For _beginthreadex(), _endthreadex()
97 #include <imagehlp.h> // For os::dll_address_to_function_name
98 // for enumerating dll libraries
99 #include <vdmdbg.h>
100 #include <psapi.h>
101
102 // for timer info max values which include all bits
103 #define ALL_64_BITS CONST64(-1)
104
105 // For DLL loading/load error detection
106 // Values of PE COFF
107 #define IMAGE_FILE_PTR_TO_SIGNATURE 0x3c
108 #define IMAGE_FILE_SIGNATURE_LENGTH 4
109
110 static HANDLE main_process;
111 static HANDLE main_thread;
112 static int main_thread_id;
113
114 static FILETIME process_creation_time;
115 static FILETIME process_exit_time;
116 static FILETIME process_user_time;
117 static FILETIME process_kernel_time;
118
119 #ifdef _M_AMD64
|
81
82
83 #include <windows.h>
84 #include <sys/types.h>
85 #include <sys/stat.h>
86 #include <sys/timeb.h>
87 #include <objidl.h>
88 #include <shlobj.h>
89
90 #include <malloc.h>
91 #include <signal.h>
92 #include <direct.h>
93 #include <errno.h>
94 #include <fcntl.h>
95 #include <io.h>
96 #include <process.h> // For _beginthreadex(), _endthreadex()
97 #include <imagehlp.h> // For os::dll_address_to_function_name
98 // for enumerating dll libraries
99 #include <vdmdbg.h>
100 #include <psapi.h>
101 #include <mmsystem.h>
102 #include <winsock2.h>
103
104 // for timer info max values which include all bits
105 #define ALL_64_BITS CONST64(-1)
106
107 // For DLL loading/load error detection
108 // Values of PE COFF
109 #define IMAGE_FILE_PTR_TO_SIGNATURE 0x3c
110 #define IMAGE_FILE_SIGNATURE_LENGTH 4
111
112 static HANDLE main_process;
113 static HANDLE main_thread;
114 static int main_thread_id;
115
116 static FILETIME process_creation_time;
117 static FILETIME process_exit_time;
118 static FILETIME process_user_time;
119 static FILETIME process_kernel_time;
120
121 #ifdef _M_AMD64
|