Skip to content

Commit 4970478

Browse files
committed
chore(profiling): use weaker mem ordering for COUNTER
1 parent c664ed7 commit 4970478

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

libdd-profiling/src/internal/profile/interning_api/generational_ids.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// Copyright 2025-Present Datadog, Inc. https://www.datadoghq.com/
22
// SPDX-License-Identifier: Apache-2.0
33

4-
use std::sync::atomic::AtomicU64;
4+
use std::sync::atomic::{AtomicU64, Ordering};
55

66
/// Opaque identifier for the profiler generation
77
#[derive(Clone, Copy, PartialEq, Eq)]
@@ -17,7 +17,7 @@ impl Generation {
1717
pub fn new() -> Self {
1818
static COUNTER: AtomicU64 = AtomicU64::new(0);
1919
Self {
20-
id: COUNTER.fetch_add(1, std::sync::atomic::Ordering::SeqCst),
20+
id: COUNTER.fetch_add(1, Ordering::Relaxed),
2121
}
2222
}
2323
}

0 commit comments

Comments
 (0)