Import Cobalt 19.master.0.186250
Change-Id: Ie359b0f308019aa285c9276e591f876610f890a5
diff --git a/src/base/base.gyp b/src/base/base.gyp
index 58fa372..6f09cd4 100644
--- a/src/base/base.gyp
+++ b/src/base/base.gyp
@@ -20,7 +20,6 @@
},
'dependencies': [
'<(DEPTH)/nb/nb.gyp:nb',
- '<(DEPTH)/starboard/client_porting/eztime/eztime.gyp:eztime',
'<(DEPTH)/starboard/starboard.gyp:starboard',
'<(DEPTH)/testing/gtest.gyp:gtest_prod',
'<(DEPTH)/third_party/modp_b64/modp_b64.gyp:modp_b64',
diff --git a/src/base/logging.cc b/src/base/logging.cc
index bc2356e..a1e61b5 100644
--- a/src/base/logging.cc
+++ b/src/base/logging.cc
@@ -121,7 +121,7 @@
// what should be prepended to each message?
bool log_process_id = false;
-bool log_thread_id = false;
+bool log_thread_id = true;
bool log_timestamp = true;
bool log_tickcount = false;
@@ -794,7 +794,9 @@
stream_ << base::PlatformThread::CurrentId() << ':';
if (log_timestamp) {
#if defined(OS_STARBOARD)
- EzTimeT t = EzTimeTGetNow(NULL);
+ EzTimeValue time_value;
+ EzTimeValueGetNow(&time_value, NULL);
+ EzTimeT t = time_value.tv_sec;
struct EzTimeExploded local_time = {0};
EzTimeTExplodeLocal(&t, &local_time);
struct EzTimeExploded* tm_time = &local_time;
@@ -815,6 +817,9 @@
<< std::setw(2) << tm_time->tm_hour
<< std::setw(2) << tm_time->tm_min
<< std::setw(2) << tm_time->tm_sec
+#if defined(OS_STARBOARD)
+ << '.' << std::setw(6) << time_value.tv_usec
+#endif
<< ':';
}
if (log_tickcount)
diff --git a/src/cobalt/build/build.id b/src/cobalt/build/build.id
index 0952d93..a23811b 100644
--- a/src/cobalt/build/build.id
+++ b/src/cobalt/build/build.id
@@ -1 +1 @@
-186195
\ No newline at end of file
+186250
\ No newline at end of file
diff --git a/src/cobalt/storage/storage_manager.cc b/src/cobalt/storage/storage_manager.cc
index 37b98d7..e7eb5e5 100644
--- a/src/cobalt/storage/storage_manager.cc
+++ b/src/cobalt/storage/storage_manager.cc
@@ -86,7 +86,7 @@
base::Unretained(this), callback));
return;
}
-
+ FinishInit();
callback.Run(*memory_store_.get());
}
@@ -98,7 +98,7 @@
base::Unretained(this), callback));
return;
}
-
+ FinishInit();
callback.Run(memory_store_.get());
FlushOnChange();
}
diff --git a/src/starboard/nplb/memory_reporter_test.cc b/src/starboard/nplb/memory_reporter_test.cc
index 153b2ac..6f68fa4 100644
--- a/src/starboard/nplb/memory_reporter_test.cc
+++ b/src/starboard/nplb/memory_reporter_test.cc
@@ -285,7 +285,7 @@
// will report memory allocations.
TEST_F(MemoryReportingTest, CapturesAllocDealloc) {
if (!MemoryReportingEnabled()) {
- SB_DLOG(INFO) << "Memory reporting is disabled.";
+ SbLog(kSbLogPriorityInfo, "Memory reporting is disabled.\n");
return;
}
EXPECT_EQ_NO_TRACKING(0, mem_reporter()->number_allocs());
@@ -305,7 +305,7 @@
// deallocation and an allocation to the memory tracker.
TEST_F(MemoryReportingTest, CapturesRealloc) {
if (!MemoryReportingEnabled()) {
- SB_DLOG(INFO) << "Memory reporting is disabled.";
+ SbLog(kSbLogPriorityInfo, "Memory reporting is disabled.\n");
return;
}
void* prev_memory = SbMemoryAllocate(4);
@@ -325,7 +325,7 @@
// will report memory allocations.
TEST_F(MemoryReportingTest, CapturesMemMapUnmap) {
if (!MemoryReportingEnabled()) {
- SB_DLOG(INFO) << "Memory reporting is disabled.";
+ SbLog(kSbLogPriorityInfo, "Memory reporting is disabled.\n");
return;
}
const int64_t kMemSize = 4096;
@@ -346,7 +346,7 @@
// memory allocations.
TEST_F(MemoryReportingTest, CapturesOperatorNewDelete) {
if (!MemoryReportingEnabled()) {
- SB_DLOG(INFO) << "Memory reporting is disabled.";
+ SbLog(kSbLogPriorityInfo, "Memory reporting is disabled.\n");
return;
}
EXPECT_TRUE_NO_TRACKING(mem_reporter()->number_allocs() == 0);
diff --git a/src/starboard/shared/starboard/log_message.cc b/src/starboard/shared/starboard/log_message.cc
index ae61001..20239b2 100644
--- a/src/starboard/shared/starboard/log_message.cc
+++ b/src/starboard/shared/starboard/log_message.cc
@@ -19,6 +19,7 @@
#include <sstream>
#include <string>
+#include "starboard/client_porting/eztime/eztime.h"
#include "starboard/client_porting/poem/string_poem.h"
#include "starboard/mutex.h"
#include "starboard/system.h"
@@ -145,7 +146,17 @@
stream_ << '[';
stream_ << SbThreadGetId() << ':';
- stream_ << SbTimeGetMonotonicNow() << ':';
+ EzTimeValue time_value;
+ EzTimeValueGetNow(&time_value, NULL);
+ EzTimeT t = time_value.tv_sec;
+ struct EzTimeExploded local_time = {0};
+ EzTimeTExplodeLocal(&t, &local_time);
+ struct EzTimeExploded* tm_time = &local_time;
+ stream_ << std::setfill('0') << std::setw(2) << 1 + tm_time->tm_mon
+ << std::setw(2) << tm_time->tm_mday << '/' << std::setw(2)
+ << tm_time->tm_hour << std::setw(2) << tm_time->tm_min << std::setw(2)
+ << tm_time->tm_sec << '.' << std::setw(6) << time_value.tv_usec
+ << ':';
stream_ << log_priority_names[priority_];
stream_ << ":" << filename << "(" << line << ")] ";
message_start_ = stream_.tellp();
diff --git a/src/starboard/starboard.gyp b/src/starboard/starboard.gyp
index f3da4ad..6587145 100644
--- a/src/starboard/starboard.gyp
+++ b/src/starboard/starboard.gyp
@@ -23,6 +23,7 @@
'type': 'none',
'dependencies': [
'<(DEPTH)/<(starboard_path)/starboard_platform.gyp:starboard_platform',
+ '<(DEPTH)/starboard/client_porting/eztime/eztime.gyp:eztime',
'<(DEPTH)/starboard/starboard_headers_only.gyp:starboard_headers_only',
'common/common.gyp:common',
],