Skip to content

Commit

Permalink
Add an IS_SCRATCH flag to mark scratch memory with.
Browse files Browse the repository at this point in the history
  • Loading branch information
khuey committed Jul 28, 2024
1 parent e293422 commit e741dfa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/AddressSpace.h
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,8 @@ class AddressSpace : public HasTaskSet {
IS_RR_PAGE = 0x8,
// This mapping is the rr vdso page
IS_RR_VDSO_PAGE = 0x10,
// This mapping is the per-thread scratch space.
IS_SCRATCH = 0x20,
};
uint32_t flags;
};
Expand Down
1 change: 1 addition & 0 deletions src/record_syscall.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3375,6 +3375,7 @@ static void init_scratch_memory(RecordTask* t,

KernelMapping km =
t->vm()->map(t, t->scratch_ptr, sz, prot, flags, 0, string());
t->vm()->mapping_flags_of(t->scratch_ptr) |= AddressSpace::Mapping::IS_SCRATCH;
struct stat stat;
memset(&stat, 0, sizeof(stat));
auto record_in_trace = t->trace_writer().write_mapped_region(t,
Expand Down

0 comments on commit e741dfa

Please sign in to comment.