message: Only save per-thread events when non-empty
diff: @@ -199,8 +199,10 @@ void TraceMeRecorder::RegisterThread(int32 tid, ThreadLocalRecorder* thread) {
  void TraceMeRecorder::UnregisterThread(TraceMeRecorder::ThreadEvents&& events) {
  mutex_lock lock(mutex_);
  threads_.erase(events.thread.tid);
  + if (!events.events.empty()) {
  orphaned_events_.push_back(std::move(events));
  }
  +}
  // This method is performance critical and should be kept fast. It is called
  // when tracing starts/stops. The mutex is held, so no threads can be
  @@ -211,7 +213,10 @@ TraceMeRecorder::Events TraceMeRecorder::Clear() {
  std::swap(orphaned_events_, result);
  for (const auto& entry : threads_) {
  auto* recorder = entry.second;
  - result.push_back(recorder->Clear());
  + TraceMeRecorder::ThreadEvents events = recorder->Clear();
  + if (!events.events.empty()) {
  + result.push_back(std::move(events));
  + }
  }
  return result;
  }
  