OLD | NEW |
1 // Copyright (c) 2014, Intel Corporation | 1 // Copyright (c) 2014, Intel Corporation |
2 // All rights reserved. | 2 // All rights reserved. |
3 // | 3 // |
4 // Redistribution and use in source and binary forms, with or without | 4 // Redistribution and use in source and binary forms, with or without |
5 // modification, are permitted provided that the following conditions are | 5 // modification, are permitted provided that the following conditions are |
6 // met: | 6 // met: |
7 // | 7 // |
8 // * Redistributions of source code must retain the above copyright | 8 // * Redistributions of source code must retain the above copyright |
9 // notice, this list of conditions and the following disclaimer. | 9 // notice, this list of conditions and the following disclaimer. |
10 // * Redistributions in binary form must reproduce the above | 10 // * Redistributions in binary form must reproduce the above |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 #endif | 97 #endif |
98 return true; | 98 return true; |
99 } | 99 } |
100 else | 100 else |
101 return false; | 101 return false; |
102 } | 102 } |
103 | 103 |
104 CIntelPowerGadgetLib::CIntelPowerGadgetLib(void) : | 104 CIntelPowerGadgetLib::CIntelPowerGadgetLib(void) : |
105 pInitialize(NULL), | 105 pInitialize(NULL), |
106 pGetNumNodes(NULL), | 106 pGetNumNodes(NULL), |
| 107 pGetNumMsrs(NULL), |
107 pGetMsrName(NULL), | 108 pGetMsrName(NULL), |
108 pGetMsrFunc(NULL), | 109 pGetMsrFunc(NULL), |
109 pGetIAFrequency(NULL), | 110 pGetIAFrequency(NULL), |
110 pGetTDP(NULL), | 111 pGetTDP(NULL), |
111 pGetMaxTemperature(NULL), | 112 pGetMaxTemperature(NULL), |
112 pGetTemperature(NULL), | 113 pGetTemperature(NULL), |
113 pReadSample(NULL), | 114 pReadSample(NULL), |
114 pGetSysTime(NULL), | 115 pGetSysTime(NULL), |
115 pGetRDTSC(NULL), | 116 pGetRDTSC(NULL), |
116 pGetTimeInterval(NULL), | 117 pGetTimeInterval(NULL), |
117 pGetBaseFrequency(NULL), | 118 pGetBaseFrequency(NULL), |
118 pGetPowerData(NULL), | 119 pGetPowerData(NULL), |
119 pStartLog(NULL), | 120 pStartLog(NULL), |
120 » pStopLog(NULL), | 121 » pStopLog(NULL) |
121 » pGetNumMsrs(NULL) | |
122 { | 122 { |
123 wstring strLocation; | 123 wstring strLocation; |
124 if (GetLibraryLocation(strLocation) == false) | 124 if (GetLibraryLocation(strLocation) == false) |
125 { | 125 { |
126 g_lastError = "Intel Power Gadget 2.7 or higher not found. If un
sure, check if the path is in the user's path environment variable"; | 126 g_lastError = "Intel Power Gadget 2.7 or higher not found. If un
sure, check if the path is in the user's path environment variable"; |
127 return; | 127 return; |
128 } | 128 } |
129 | 129 |
130 g_hModule = LoadLibrary(strLocation.c_str()); | 130 g_hModule = LoadLibrary(strLocation.c_str()); |
131 if (g_hModule == NULL) | 131 if (g_hModule == NULL) |
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
258 | 258 |
259 bool CIntelPowerGadgetLib::StartLog(wchar_t *szFilename) | 259 bool CIntelPowerGadgetLib::StartLog(wchar_t *szFilename) |
260 { | 260 { |
261 return pStartLog(szFilename); | 261 return pStartLog(szFilename); |
262 } | 262 } |
263 | 263 |
264 bool CIntelPowerGadgetLib::StopLog() | 264 bool CIntelPowerGadgetLib::StopLog() |
265 { | 265 { |
266 return pStopLog(); | 266 return pStopLog(); |
267 } | 267 } |
OLD | NEW |