| 106 | } |
| 107 | |
| 108 | TraceEntry* Trace::NewEntry(int msg_len, const char* file_path, int line_number) { |
| 109 | int size = sizeof(TraceEntry) + msg_len; |
| 110 | uint8_t* dst = reinterpret_cast<uint8_t*>(arena_->AllocateBytes(size)); |
| 111 | TraceEntry* entry = reinterpret_cast<TraceEntry*>(dst); |
| 112 | entry->timestamp_micros = GetCurrentTimeMicros(); |
| 113 | entry->message_len = msg_len; |
| 114 | entry->file_path = file_path; |
| 115 | entry->line_number = line_number; |
| 116 | return entry; |
| 117 | } |
| 118 | |
| 119 | void Trace::AddEntry(TraceEntry* entry) { |
| 120 | std::lock_guard<simple_spinlock> l(lock_); |
nothing calls this directly
no test coverage detected