| 528 | } |
| 529 | |
| 530 | void Profiler::recordEventOnly(EventType event_type, Event* event) { |
| 531 | if (!_jfr.active()) { |
| 532 | return; |
| 533 | } |
| 534 | |
| 535 | int tid = OS::threadId(); |
| 536 | u32 lock_index = getLockIndex(tid); |
| 537 | if (!_locks[lock_index].tryLock() && |
| 538 | !_locks[lock_index = (lock_index + 1) % CONCURRENCY_LEVEL].tryLock() && |
| 539 | !_locks[lock_index = (lock_index + 2) % CONCURRENCY_LEVEL].tryLock()) |
| 540 | { |
| 541 | return; |
| 542 | } |
| 543 | |
| 544 | _jfr.recordEvent(lock_index, tid, 0, event_type, event); |
| 545 | |
| 546 | _locks[lock_index].unlock(); |
| 547 | } |
| 548 | |
| 549 | void Profiler::tryResetCounters() { |
| 550 | // Reset counters only for non-JFR recording, otherwise resetting may cause missing stack traces for some |
no test coverage detected