Title memory by address: the dump names what was built and unpacked; a small buffer's results once a list
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
e1561288e7
commit
c51ca571ee
1 file changed
+17
-1
@@ -823,15 +823,21 @@ pub(crate) fn ready(
|
|||||||
for &at in addresses.iter().filter(|&&a| a >= 1 << 32) {
|
for &at in addresses.iter().filter(|&&a| a >= 1 << 32) {
|
||||||
// (Several structures to a page.)
|
// (Several structures to a page.)
|
||||||
let packed = builds && list.first_use(usize::MAX - (3 << 33) - (at >> 8) as usize) && m.unpacks(at);
|
let packed = builds && list.first_use(usize::MAX - (3 << 33) - (at >> 8) as usize) && m.unpacks(at);
|
||||||
if builds && written.contains(&at) && named(4, at) {
|
if builds && written.contains(&at) && list.first_use(usize::MAX - (4 << 33) - (at >> 2 & 0x7FFF_FFFF) as usize) {
|
||||||
if let Some((start, len)) = crate::shadow::in_buffer(at, 1)
|
if let Some((start, len)) = crate::shadow::in_buffer(at, 1)
|
||||||
&& len <= BACK
|
&& len <= BACK
|
||||||
&& use_ == (Use::Builds { back: true })
|
&& use_ == (Use::Builds { back: true })
|
||||||
|
&& list.first_use(usize::MAX - (5 << 33) - (start >> 2 & 0x7FFF_FFFF) as usize)
|
||||||
{
|
{
|
||||||
m.small(list, start, len);
|
m.small(list, start, len);
|
||||||
}
|
}
|
||||||
m.opens(at);
|
m.opens(at);
|
||||||
if !packed && crate::shadow::in_buffer(at, 1).is_none() {
|
if !packed && crate::shadow::in_buffer(at, 1).is_none() {
|
||||||
|
#[cfg(feature = "diagnostics")]
|
||||||
|
{
|
||||||
|
let built = m.dump.built.entry(at).or_insert((frame, frame, 0));
|
||||||
|
(built.1, built.2) = (frame, built.2 + 1);
|
||||||
|
}
|
||||||
let before = held(m);
|
let before = held(m);
|
||||||
m.ready(at, BUILT);
|
m.ready(at, BUILT);
|
||||||
came[1] += held(m).saturating_sub(before);
|
came[1] += held(m).saturating_sub(before);
|
||||||
@@ -914,6 +920,9 @@ mod dump {
|
|||||||
#[derive(Default)]
|
#[derive(Default)]
|
||||||
pub(super) struct Dump {
|
pub(super) struct Dump {
|
||||||
walked: std::collections::BTreeSet<u64>,
|
walked: std::collections::BTreeSet<u64>,
|
||||||
|
/// Views the builder was given to write outside buffers: the first
|
||||||
|
/// and the last frame, how often.
|
||||||
|
pub(super) built: std::collections::BTreeMap<u64, (u64, u64, u64)>,
|
||||||
/// The frame it is written at, and the copies.
|
/// The frame it is written at, and the copies.
|
||||||
due: Option<(u64, Vec<(ID3D12Resource, usize)>)>,
|
due: Option<(u64, Vec<(ID3D12Resource, usize)>)>,
|
||||||
done: bool,
|
done: bool,
|
||||||
@@ -962,6 +971,13 @@ mod dump {
|
|||||||
for a in &self.dump.walked {
|
for a in &self.dump.walked {
|
||||||
text += &format!("walked {a:#x}\n");
|
text += &format!("walked {a:#x}\n");
|
||||||
}
|
}
|
||||||
|
for (a, (first, last, n)) in &self.dump.built {
|
||||||
|
text += &format!("built {a:#x} {first} {last} {n}\n");
|
||||||
|
}
|
||||||
|
for (a, p) in &self.packed {
|
||||||
|
text += &format!("packed {a:#x} {} {}\n", p.len, p.frame);
|
||||||
|
}
|
||||||
|
text += &format!("frame {}\n", self.frame);
|
||||||
for (page, held) in &self.pages {
|
for (page, held) in &self.pages {
|
||||||
let arena = self.arenas.iter().position(|a| a.0 == held.copy).unwrap_or(usize::MAX);
|
let arena = self.arenas.iter().position(|a| a.0 == held.copy).unwrap_or(usize::MAX);
|
||||||
let at = held.at - self.arenas[arena].1;
|
let at = held.at - self.arenas[arena].1;
|
||||||
|
|||||||
Reference in new issue
Block a user