Skip to content

Add logs for dropping alloc #561

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions hyperactor_mesh/src/alloc/local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,16 @@ impl Alloc for LocalAlloc {
}
}

impl Drop for LocalAlloc {
fn drop(&mut self) {
tracing::debug!(
"dropping LocalAlloc of name: {}, world id: {}",
self.name,
self.world_id
);
}
}

#[cfg(test)]
mod tests {
use super::*;
Expand Down
10 changes: 10 additions & 0 deletions hyperactor_mesh/src/alloc/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -502,6 +502,16 @@ impl Alloc for ProcessAlloc {
}
}

impl Drop for ProcessAlloc {
fn drop(&mut self) {
tracing::debug!(
"dropping ProcessAlloc of name: {}, world id: {}",
self.name,
self.world_id
);
}
}

#[cfg(test)]
mod tests {
use super::*;
Expand Down
6 changes: 6 additions & 0 deletions hyperactor_mesh/src/alloc/remoteprocess.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1042,6 +1042,12 @@ impl Alloc for RemoteProcessAlloc {
}
}

impl Drop for RemoteProcessAlloc {
fn drop(&mut self) {
tracing::debug!("dropping RemoteProcessAlloc of world_id {}", self.world_id);
}
}

#[cfg(test)]
mod test {
use std::assert_matches::assert_matches;
Expand Down
Loading