summaryrefslogtreecommitdiff
path: root/patchoat/patchoat.h
diff options
context:
space:
mode:
author Ian Rogers <irogers@google.com> 2014-10-16 20:31:53 -0700
committer Ian Rogers <irogers@google.com> 2014-10-16 21:30:37 -0700
commitd4c4d953035d4418126d36517e402f411d6a87f3 (patch)
tree735aacf812bbac7c1ae7c0788c1ca6f58cfa82ee /patchoat/patchoat.h
parent6f3dbbadf4ce66982eb3d400e0a74cb73eb034f3 (diff)
Some code clean-up.
Change-Id: I4b745fd5298cd61c793e3b57514b48347bd66c0e
Diffstat (limited to 'patchoat/patchoat.h')
-rw-r--r--patchoat/patchoat.h20
1 files changed, 11 insertions, 9 deletions
diff --git a/patchoat/patchoat.h b/patchoat/patchoat.h
index 7dd95f5d6b..fd36ad59a3 100644
--- a/patchoat/patchoat.h
+++ b/patchoat/patchoat.h
@@ -52,7 +52,8 @@ class PatchOat {
private:
// Takes ownership only of the ElfFile. All other pointers are only borrowed.
PatchOat(ElfFile* oat_file, off_t delta, TimingLogger* timings)
- : oat_file_(oat_file), delta_(delta), timings_(timings) {}
+ : oat_file_(oat_file), image_(nullptr), bitmap_(nullptr), heap_(nullptr), delta_(delta),
+ timings_(timings) {}
PatchOat(MemMap* image, gc::accounting::ContinuousSpaceBitmap* bitmap,
MemMap* heap, off_t delta, TimingLogger* timings)
: image_(image), bitmap_(bitmap), heap_(heap),
@@ -106,21 +107,22 @@ class PatchOat {
void operator() (mirror::Class* cls, mirror::Reference* ref) const
EXCLUSIVE_LOCKS_REQUIRED(Locks::mutator_lock_, Locks::heap_bitmap_lock_);
private:
- PatchOat* patcher_;
- mirror::Object* copy_;
+ PatchOat* const patcher_;
+ mirror::Object* const copy_;
};
// The elf file we are patching.
std::unique_ptr<ElfFile> oat_file_;
// A mmap of the image we are patching. This is modified.
- const MemMap* image_;
+ const MemMap* const image_;
+ // The bitmap over the image within the heap we are patching. This is not modified.
+ gc::accounting::ContinuousSpaceBitmap* const bitmap_;
// The heap we are patching. This is not modified.
- gc::accounting::ContinuousSpaceBitmap* bitmap_;
- // The heap we are patching. This is not modified.
- const MemMap* heap_;
+ const MemMap* const heap_;
// The amount we are changing the offset by.
- off_t delta_;
- TimingLogger* timings_;
+ const off_t delta_;
+ // Timing splits.
+ TimingLogger* const timings_;
DISALLOW_IMPLICIT_CONSTRUCTORS(PatchOat);
};