Skip to content

[MemProf][NFC] Compute SHADOW_ENTRY_SIZE from MEM_GRANULARITY and SHA… #80589

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

Merged
merged 1 commit into from
Feb 6, 2024
Merged
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
4 changes: 2 additions & 2 deletions compiler-rt/lib/memprof/memprof_mapping.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ extern uptr kHighMemEnd; // Initialized in __memprof_init.

} // namespace __memprof

#define SHADOW_ENTRY_SIZE 8

// Size of memory block mapped to a single shadow location
#define MEM_GRANULARITY 64ULL

Expand All @@ -39,6 +37,8 @@ extern uptr kHighMemEnd; // Initialized in __memprof_init.
#define MEM_TO_SHADOW(mem) \
((((mem) & SHADOW_MASK) >> SHADOW_SCALE) + (SHADOW_OFFSET))

#define SHADOW_ENTRY_SIZE (MEM_GRANULARITY >> SHADOW_SCALE)

#define kLowMemBeg 0
#define kLowMemEnd (SHADOW_OFFSET ? SHADOW_OFFSET - 1 : 0)

Expand Down