Skip to content

Commit ebee265

Browse files
stepanchegfacebook-github-bot
authored andcommitted
Clone for AggregateHeapProfileInfo
Summary: Following diff D38518063 makes it public, users may want to clone it. Reviewed By: krallin Differential Revision: D38527562 fbshipit-source-id: 6f26b846cb718ced7a30619be51eef78d3d46f4c
1 parent 9ffc05c commit ebee265

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

starlark/src/values/layout/heap/profile/aggregated.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,7 @@ impl<'v> ArenaVisitor<'v> for StackCollector {
196196
}
197197

198198
/// Aggregated stack frame data.
199+
#[derive(Clone)]
199200
pub(crate) struct StackFrame {
200201
/// Aggregated callees.
201202
pub(crate) callees: SmallMap<StringId, StackFrame>,
@@ -285,6 +286,7 @@ impl<'c> StackFrameWithContext<'c> {
285286
}
286287
}
287288

289+
#[derive(Clone)]
288290
pub(crate) struct AggregateHeapProfileInfo {
289291
pub(crate) strings: StringIndex,
290292
pub(crate) root: StackFrame,

starlark/src/values/layout/heap/profile/string_index.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ use gazebo::prelude::*;
2020
use starlark_map::small_set::SmallSet;
2121

2222
/// Map strings to integers 0, 1, 2, ...
23-
#[derive(Default)]
23+
#[derive(Default, Clone)]
2424
pub(crate) struct StringIndex {
2525
strings: SmallSet<String>,
2626
}

0 commit comments

Comments
 (0)