diff options
author | Ian Rogers <irogers@google.com> | 2014-10-21 23:31:19 -0700 |
---|---|---|
committer | Ian Rogers <irogers@google.com> | 2014-10-22 12:06:23 -0700 |
commit | c7dd295a4e0cc1d15c0c96088e55a85389bade74 (patch) | |
tree | 0c08a2236bc9ba5d9a4dc75d4dd0ed2d76f8f1c6 /runtime/base/unix_file/mapped_file.cc | |
parent | 94e5af8602150efa95bde35cc9be9891ddf30135 (diff) | |
download | android_art-c7dd295a4e0cc1d15c0c96088e55a85389bade74.tar.gz android_art-c7dd295a4e0cc1d15c0c96088e55a85389bade74.tar.bz2 android_art-c7dd295a4e0cc1d15c0c96088e55a85389bade74.zip |
Tidy up logging.
Move gVerboseMethods to CompilerOptions. Now "--verbose-methods=" option to
dex2oat rather than runtime argument "-verbose-methods:".
Move ToStr and Dumpable out of logging.h, move LogMessageData into logging.cc
except for a forward declaration.
Remove ConstDumpable as Dump methods are all const (and make this so if not
currently true).
Make LogSeverity an enum and improve compile time assertions and type checking.
Remove log_severity.h that's only used in logging.h.
With system headers gone from logging.h, go add to .cc files missing system
header includes.
Also, make operator new in ValueObject private for compile time instantiation
checking.
Change-Id: I3228f614500ccc9b14b49c72b9821c8b0db3d641
Diffstat (limited to 'runtime/base/unix_file/mapped_file.cc')
-rw-r--r-- | runtime/base/unix_file/mapped_file.cc | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/runtime/base/unix_file/mapped_file.cc b/runtime/base/unix_file/mapped_file.cc index 63927b1216..77f4d020a9 100644 --- a/runtime/base/unix_file/mapped_file.cc +++ b/runtime/base/unix_file/mapped_file.cc @@ -42,7 +42,7 @@ bool MappedFile::MapReadOnly() { struct stat st; int result = TEMP_FAILURE_RETRY(fstat(Fd(), &st)); if (result == -1) { - PLOG(WARNING) << "Failed to stat file '" << GetPath() << "'"; + PLOG(::art::WARNING) << "Failed to stat file '" << GetPath() << "'"; return false; } file_size_ = st.st_size; @@ -50,8 +50,8 @@ bool MappedFile::MapReadOnly() { mapped_file_ = mmap(NULL, file_size_, PROT_READ, MAP_PRIVATE, Fd(), 0); } while (mapped_file_ == MAP_FAILED && errno == EINTR); if (mapped_file_ == MAP_FAILED) { - PLOG(WARNING) << "Failed to mmap file '" << GetPath() << "' of size " - << file_size_ << " bytes to memory"; + PLOG(::art::WARNING) << "Failed to mmap file '" << GetPath() << "' of size " + << file_size_ << " bytes to memory"; return false; } map_mode_ = kMapReadOnly; @@ -67,8 +67,7 @@ bool MappedFile::MapReadWrite(int64_t file_size) { int result = TEMP_FAILURE_RETRY(ftruncate(Fd(), file_size)); #endif if (result == -1) { - PLOG(ERROR) << "Failed to truncate file '" << GetPath() - << "' to size " << file_size; + PLOG(::art::ERROR) << "Failed to truncate file '" << GetPath() << "' to size " << file_size; return false; } file_size_ = file_size; @@ -77,7 +76,7 @@ bool MappedFile::MapReadWrite(int64_t file_size) { mmap(NULL, file_size_, PROT_READ | PROT_WRITE, MAP_SHARED, Fd(), 0); } while (mapped_file_ == MAP_FAILED && errno == EINTR); if (mapped_file_ == MAP_FAILED) { - PLOG(WARNING) << "Failed to mmap file '" << GetPath() << "' of size " + PLOG(::art::WARNING) << "Failed to mmap file '" << GetPath() << "' of size " << file_size_ << " bytes to memory"; return false; } @@ -89,8 +88,7 @@ bool MappedFile::Unmap() { CHECK(IsMapped()); int result = TEMP_FAILURE_RETRY(munmap(mapped_file_, file_size_)); if (result == -1) { - PLOG(WARNING) << "Failed unmap file '" << GetPath() << "' of size " - << file_size_; + PLOG(::art::WARNING) << "Failed unmap file '" << GetPath() << "' of size " << file_size_; return false; } else { mapped_file_ = NULL; |