/** Return pointer to new tracebuffer entry. */ PUBLIC static Tb_entry* Jdb_tbuf::new_entry() { Tb_entry *tb; { auto guard = lock_guard(_lock); tb = _tbuf_act; status()->current = (Address)tb; if (++_tbuf_act >= _tbuf_max) _tbuf_act = buffer(); if (_entries < _max_entries) _entries++; tb->number(++_number); } tb->rdtsc(); tb->rdpmc1(); tb->rdpmc2(); return tb; }