mirror of
https://github.com/facebook/react.git
synced 2026-02-26 18:05:08 +00:00
Make hardware-counter.cpp compile
`g++ -std=c++11 -lpthread src/hardware-counter.cpp
src/thread-local.cpp src/test.cpp` works and runs where `src/test.cpp` is:
```
int main() {
bool enable = true;
std::string events = "";
bool recordSubprocesses = false;
HPHP::HardwareCounter::Init(enable, events, recordSubprocesses);
HPHP::HardwareCounter::s_counter.getCheck();
int64_t start = HPHP::HardwareCounter::GetInstructionCount();
volatile int x;
for (int i = 0; i < 1000000; i++) {
x += i;
}
int64_t end = HPHP::HardwareCounter::GetInstructionCount();
printf("%d\n", end - start);
}
```
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
|
||||
#include "hphp/util/thread-local.h"
|
||||
#include "thread-local.h"
|
||||
|
||||
#ifdef __linux__
|
||||
#include <link.h>
|
||||
|
||||
Reference in New Issue
Block a user