Commit Graph

4 Commits

Author SHA1 Message Date
Ben Alpert
b3bccf2273 Add node bindings 2015-09-19 11:30:28 -07:00
Ben Alpert
e922f869e6 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);
}
```
2015-09-19 11:00:27 -07:00
Ben Alpert
42e523ea4d Update license to match React repo license 2015-09-19 11:00:27 -07:00
Ben Alpert
cfbf115b26 Add hardware-counter.cpp and deps from HHVM 2015-09-18 22:10:10 -07:00