summaryrefslogtreecommitdiffstats
path: root/runtime/base
diff options
context:
space:
mode:
authorMathieu Chartier <mathieuc@google.com>2013-11-26 12:00:11 -0800
committerMathieu Chartier <mathieuc@google.com>2013-12-10 16:00:58 -0800
commitc528dba35b5faece51ca658fc008b688f8b690ad (patch)
treed95c113a639d07f7e3b88e8a6caa9b5f6e044801 /runtime/base
parent76f552307ee980221626d1dff0ada56c989d24ca (diff)
downloadart-c528dba35b5faece51ca658fc008b688f8b690ad.zip
art-c528dba35b5faece51ca658fc008b688f8b690ad.tar.gz
art-c528dba35b5faece51ca658fc008b688f8b690ad.tar.bz2
Enable moving classes.
Slight reduction in Zygote size, memory savings are in the noise. Before: Zygote size: 8739224 After: Zygote size: 8733568 Fixed a bug where we didn't set the concurrent start bytes after switching the allocator from bump pointer to ROSAlloc in the zygote. This caused excessive memory usage. Added the method verifiers as roots to fix an issue caused by RegTypes holding a Class*. Added logic to clear card table in the SemiSpace collector, this reduces DalvikOther from ~2400k -> ~1760k when using the SemiSpace collector. Added a missing lock to the timing loggers which caused a rare one time crash in std::set. Bug: 11771255 Bug: 8499494 Bug: 10802951 Change-Id: I99d2b528cd51c1c5ed7012e3220b3aefded680ae
Diffstat (limited to 'runtime/base')
-rw-r--r--runtime/base/timing_logger.cc2
-rw-r--r--runtime/base/timing_logger.h7
2 files changed, 5 insertions, 4 deletions
diff --git a/runtime/base/timing_logger.cc b/runtime/base/timing_logger.cc
index c8dee6d..bb32b2d 100644
--- a/runtime/base/timing_logger.cc
+++ b/runtime/base/timing_logger.cc
@@ -43,6 +43,7 @@ CumulativeLogger::~CumulativeLogger() {
}
void CumulativeLogger::SetName(const std::string& name) {
+ MutexLock mu(Thread::Current(), lock_);
name_.assign(name);
}
@@ -61,6 +62,7 @@ void CumulativeLogger::Reset() {
}
uint64_t CumulativeLogger::GetTotalNs() const {
+ MutexLock mu(Thread::Current(), lock_);
return GetTotalTime() * kAdjust;
}
diff --git a/runtime/base/timing_logger.h b/runtime/base/timing_logger.h
index c1ff0a3..b0bcf10 100644
--- a/runtime/base/timing_logger.h
+++ b/runtime/base/timing_logger.h
@@ -31,16 +31,15 @@ class TimingLogger;
class CumulativeLogger {
public:
explicit CumulativeLogger(const std::string& name);
- void prepare_stats();
~CumulativeLogger();
void Start();
- void End();
- void Reset();
+ void End() LOCKS_EXCLUDED(lock_);
+ void Reset() LOCKS_EXCLUDED(lock_);
void Dump(std::ostream& os) LOCKS_EXCLUDED(lock_);
uint64_t GetTotalNs() const;
// Allow the name to be modified, particularly when the cumulative logger is a field within a
// parent class that is unable to determine the "name" of a sub-class.
- void SetName(const std::string& name);
+ void SetName(const std::string& name) LOCKS_EXCLUDED(lock_);
void AddLogger(const TimingLogger& logger) LOCKS_EXCLUDED(lock_);
size_t GetIterations() const;