(&self, sample_rate: u64)
| 738 | } |
| 739 | |
| 740 | fn should_sample(&self, sample_rate: u64) -> bool { |
| 741 | if sample_rate <= 1 { |
| 742 | return true; |
| 743 | } |
| 744 | let seq = self.allocation_seq.fetch_add(1, Ordering::Relaxed); |
| 745 | seq.is_multiple_of(sample_rate) |
| 746 | } |
| 747 | } |
| 748 | |
| 749 | pub struct ProfiledMiMalloc { |