Skip to content

Commit b80489f

Browse files
gloop-copybara-botcopybara-github
authored andcommitted
Internal cleanup
PiperOrigin-RevId: 957370743
1 parent df35660 commit b80489f

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

gloop/base/tracer.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -917,6 +917,16 @@ class Tracer {
917917
cpu_profile_ticks_.fetch_add(ticks, std::memory_order_relaxed);
918918
}
919919

920+
// Returns the total lock contention delay accumulated in this Tracer, if
921+
// supported by the concrete tracer type. Note that this only works when the
922+
// --census_record_lock_contention_to_dapper flag is set.
923+
virtual uint64_t lock_contention() const { return 0; }
924+
925+
// Increments the lock contention delay by the specified number of
926+
// microseconds, if supported by the concrete tracer type. Note that this
927+
// only works when the --census_record_lock_contention_to_dapper flag is set.
928+
virtual void add_contention_lock_delay_safe(uint64_t delay_us) {}
929+
920930
// Registers a notification to be called just before this Tracer's final
921931
// ref is released by the application.
922932
//

0 commit comments

Comments
 (0)