summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Sebastien Hertz <shertz@google.com> 2015-08-25 15:25:41 +0200
committer Sebastien Hertz <shertz@google.com> 2015-08-25 15:56:54 +0200
commitaa50d3a01a4137cd89c152be5487fed23683d0ff (patch)
treea676638c9d43eb519214445173c1a66ba38355ac
parentf0170ded84fbcd3d9152cdbcf9ffbf74c71b03ba (diff)
Add missing field init in constructors
Adds missing field initializations detected by Eclipse IDE. Change-Id: I5f2f32bcccb12545fc9f0b42fcec74a23dc81376
-rw-r--r--compiler/optimizing/builder.h3
-rw-r--r--runtime/gc/collector/semi_space.cc10
-rw-r--r--runtime/hprof/hprof.cc1
-rw-r--r--runtime/image.h5
-rw-r--r--runtime/jdwp/jdwp_socket.cc8
-rw-r--r--runtime/profiler.cc11
-rw-r--r--runtime/profiler.h2
-rw-r--r--runtime/thread.h3
8 files changed, 33 insertions, 10 deletions
diff --git a/compiler/optimizing/builder.h b/compiler/optimizing/builder.h
index 19dd94475a..d6b25ee822 100644
--- a/compiler/optimizing/builder.h
+++ b/compiler/optimizing/builder.h
@@ -76,7 +76,8 @@ class HGraphBuilder : public ValueObject {
code_start_(nullptr),
latest_result_(nullptr),
can_use_baseline_for_string_init_(true),
- compilation_stats_(nullptr) {}
+ compilation_stats_(nullptr),
+ interpreter_metadata_(nullptr) {}
bool BuildGraph(const DexFile::CodeItem& code);
diff --git a/runtime/gc/collector/semi_space.cc b/runtime/gc/collector/semi_space.cc
index a355d406d9..ed63ed049f 100644
--- a/runtime/gc/collector/semi_space.cc
+++ b/runtime/gc/collector/semi_space.cc
@@ -89,14 +89,24 @@ void SemiSpace::BindBitmaps() {
SemiSpace::SemiSpace(Heap* heap, bool generational, const std::string& name_prefix)
: GarbageCollector(heap,
name_prefix + (name_prefix.empty() ? "" : " ") + "marksweep + semispace"),
+ mark_stack_(nullptr),
+ is_large_object_space_immune_(false),
to_space_(nullptr),
+ to_space_live_bitmap_(nullptr),
from_space_(nullptr),
+ mark_bitmap_(nullptr),
+ self_(nullptr),
generational_(generational),
last_gc_to_space_end_(nullptr),
bytes_promoted_(0),
bytes_promoted_since_last_whole_heap_collection_(0),
large_object_bytes_allocated_at_last_whole_heap_collection_(0),
collect_from_space_only_(generational),
+ promo_dest_space_(nullptr),
+ fallback_space_(nullptr),
+ bytes_moved_(0U),
+ objects_moved_(0U),
+ saved_bytes_(0U),
collector_name_(name_),
swap_semi_spaces_(true) {
}
diff --git a/runtime/hprof/hprof.cc b/runtime/hprof/hprof.cc
index a9a236fa69..ee6b020528 100644
--- a/runtime/hprof/hprof.cc
+++ b/runtime/hprof/hprof.cc
@@ -421,6 +421,7 @@ class Hprof : public SingleRootVisitor {
fd_(fd),
direct_to_ddms_(direct_to_ddms),
start_ns_(NanoTime()),
+ output_(nullptr),
current_heap_(HPROF_HEAP_DEFAULT),
objects_in_segment_(0),
next_string_id_(0x400000),
diff --git a/runtime/image.h b/runtime/image.h
index 1a0d8fd92f..e2d59f9aa5 100644
--- a/runtime/image.h
+++ b/runtime/image.h
@@ -78,7 +78,10 @@ class PACKED(4) ImageSection {
// header of image files written by ImageWriter, read and validated by Space.
class PACKED(4) ImageHeader {
public:
- ImageHeader() : compile_pic_(0) {}
+ ImageHeader()
+ : image_begin_(0U), image_size_(0U), oat_checksum_(0U), oat_file_begin_(0U),
+ oat_data_begin_(0U), oat_data_end_(0U), oat_file_end_(0U), patch_delta_(0),
+ image_roots_(0U), pointer_size_(0U), compile_pic_(0) {}
ImageHeader(uint32_t image_begin,
uint32_t image_size_,
diff --git a/runtime/jdwp/jdwp_socket.cc b/runtime/jdwp/jdwp_socket.cc
index cbdde24ae6..4fb6df19f1 100644
--- a/runtime/jdwp/jdwp_socket.cc
+++ b/runtime/jdwp/jdwp_socket.cc
@@ -46,9 +46,11 @@ struct JdwpSocketState : public JdwpNetStateBase {
uint16_t listenPort;
int listenSock; /* listen for connection from debugger */
- explicit JdwpSocketState(JdwpState* state) : JdwpNetStateBase(state) {
- listenPort = 0;
- listenSock = -1;
+ explicit JdwpSocketState(JdwpState* state)
+ : JdwpNetStateBase(state),
+ listenPort(0U),
+ listenSock(-1),
+ remote_port_(0U) {
}
virtual bool Accept();
diff --git a/runtime/profiler.cc b/runtime/profiler.cc
index 33cfe08c33..7e8c551ab2 100644
--- a/runtime/profiler.cc
+++ b/runtime/profiler.cc
@@ -467,9 +467,14 @@ uint32_t BackgroundMethodSamplingProfiler::DumpProfile(std::ostream& os) {
// Profile Table.
// This holds a mapping of ArtMethod* to a count of how many times a sample
// hit it at the top of the stack.
-ProfileSampleResults::ProfileSampleResults(Mutex& lock) : lock_(lock), num_samples_(0),
- num_null_methods_(0),
- num_boot_methods_(0) {
+ProfileSampleResults::ProfileSampleResults(Mutex& lock)
+ : lock_(lock),
+ num_samples_(0U),
+ num_null_methods_(0U),
+ num_boot_methods_(0U),
+ previous_num_samples_(0U),
+ previous_num_null_methods_(0U),
+ previous_num_boot_methods_(0U) {
for (int i = 0; i < kHashSize; i++) {
table[i] = nullptr;
}
diff --git a/runtime/profiler.h b/runtime/profiler.h
index 30babe358d..bd29f711c0 100644
--- a/runtime/profiler.h
+++ b/runtime/profiler.h
@@ -243,7 +243,7 @@ class ProfileFile {
public:
class ProfileData {
public:
- ProfileData() : count_(0), method_size_(0), used_percent_(0) {}
+ ProfileData() : count_(0), method_size_(0), used_percent_(0), top_k_used_percentage_(0) {}
ProfileData(const std::string& method_name, uint32_t count, uint32_t method_size,
double used_percent, double top_k_used_percentage) :
method_name_(method_name), count_(count), method_size_(method_size),
diff --git a/runtime/thread.h b/runtime/thread.h
index 959af95526..9bb57bfb6b 100644
--- a/runtime/thread.h
+++ b/runtime/thread.h
@@ -1202,7 +1202,8 @@ class Thread {
last_no_thread_suspension_cause(nullptr), thread_local_start(nullptr),
thread_local_pos(nullptr), thread_local_end(nullptr), thread_local_objects(0),
thread_local_alloc_stack_top(nullptr), thread_local_alloc_stack_end(nullptr),
- nested_signal_state(nullptr), flip_function(nullptr), method_verifier(nullptr) {
+ nested_signal_state(nullptr), flip_function(nullptr), method_verifier(nullptr),
+ thread_local_mark_stack(nullptr) {
std::fill(held_mutexes, held_mutexes + kLockLevelCount, nullptr);
}