Loading cmds/incidentd/src/Section.cpp +8 −8 Original line number Diff line number Diff line Loading @@ -546,16 +546,16 @@ status_t LogSection::BlockingCall(int pipeWriteFd) const { ; android_log_list_element elem; lastTimestamp.tv_sec = msg.entry_v1.sec; lastTimestamp.tv_nsec = msg.entry_v1.nsec; lastTimestamp.tv_sec = msg.entry.sec; lastTimestamp.tv_nsec = msg.entry.nsec; // format a BinaryLogEntry uint64_t token = proto.start(LogProto::BINARY_LOGS); proto.write(BinaryLogEntry::SEC, msg.entry_v1.sec); proto.write(BinaryLogEntry::NANOSEC, msg.entry_v1.nsec); proto.write(BinaryLogEntry::UID, (int)msg.entry_v4.uid); proto.write(BinaryLogEntry::PID, msg.entry_v1.pid); proto.write(BinaryLogEntry::TID, msg.entry_v1.tid); proto.write(BinaryLogEntry::SEC, (int32_t)msg.entry.sec); proto.write(BinaryLogEntry::NANOSEC, (int32_t)msg.entry.nsec); proto.write(BinaryLogEntry::UID, (int)msg.entry.uid); proto.write(BinaryLogEntry::PID, msg.entry.pid); proto.write(BinaryLogEntry::TID, (int32_t)msg.entry.tid); proto.write(BinaryLogEntry::TAG_INDEX, get4LE(reinterpret_cast<uint8_t const*>(msg.msg()))); do { Loading Loading @@ -603,7 +603,7 @@ status_t LogSection::BlockingCall(int pipeWriteFd) const { } } else { AndroidLogEntry entry; err = android_log_processLogBuffer(&msg.entry_v1, &entry); err = android_log_processLogBuffer(&msg.entry, &entry); if (err != NO_ERROR) { ALOGW("[%s] fails to process to an entry.\n", this->name.string()); break; Loading cmds/statsd/benchmark/log_event_benchmark.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -54,9 +54,9 @@ static void getSimpleLogMsgData(log_msg* msg) { write4Bytes(99 /* a value to log*/, &buffer); buffer.push_back(EVENT_TYPE_LIST_STOP); msg->entry_v1.len = buffer.size(); msg->entry.len = buffer.size(); msg->entry.hdr_size = kLogMsgHeaderSize; msg->entry_v1.sec = time(nullptr); msg->entry.sec = time(nullptr); std::copy(buffer.begin(), buffer.end(), msg->buf + kLogMsgHeaderSize); } Loading cmds/statsd/src/logd/LogEvent.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -38,8 +38,8 @@ using std::vector; LogEvent::LogEvent(log_msg& msg) { mContext = create_android_log_parser(msg.msg() + sizeof(uint32_t), msg.len() - sizeof(uint32_t)); mLogdTimestampNs = msg.entry_v1.sec * NS_PER_SEC + msg.entry_v1.nsec; mLogUid = msg.entry_v4.uid; mLogdTimestampNs = msg.entry.sec * NS_PER_SEC + msg.entry.nsec; mLogUid = msg.entry.uid; init(mContext); if (mContext) { // android_log_destroy will set mContext to NULL Loading Loading
cmds/incidentd/src/Section.cpp +8 −8 Original line number Diff line number Diff line Loading @@ -546,16 +546,16 @@ status_t LogSection::BlockingCall(int pipeWriteFd) const { ; android_log_list_element elem; lastTimestamp.tv_sec = msg.entry_v1.sec; lastTimestamp.tv_nsec = msg.entry_v1.nsec; lastTimestamp.tv_sec = msg.entry.sec; lastTimestamp.tv_nsec = msg.entry.nsec; // format a BinaryLogEntry uint64_t token = proto.start(LogProto::BINARY_LOGS); proto.write(BinaryLogEntry::SEC, msg.entry_v1.sec); proto.write(BinaryLogEntry::NANOSEC, msg.entry_v1.nsec); proto.write(BinaryLogEntry::UID, (int)msg.entry_v4.uid); proto.write(BinaryLogEntry::PID, msg.entry_v1.pid); proto.write(BinaryLogEntry::TID, msg.entry_v1.tid); proto.write(BinaryLogEntry::SEC, (int32_t)msg.entry.sec); proto.write(BinaryLogEntry::NANOSEC, (int32_t)msg.entry.nsec); proto.write(BinaryLogEntry::UID, (int)msg.entry.uid); proto.write(BinaryLogEntry::PID, msg.entry.pid); proto.write(BinaryLogEntry::TID, (int32_t)msg.entry.tid); proto.write(BinaryLogEntry::TAG_INDEX, get4LE(reinterpret_cast<uint8_t const*>(msg.msg()))); do { Loading Loading @@ -603,7 +603,7 @@ status_t LogSection::BlockingCall(int pipeWriteFd) const { } } else { AndroidLogEntry entry; err = android_log_processLogBuffer(&msg.entry_v1, &entry); err = android_log_processLogBuffer(&msg.entry, &entry); if (err != NO_ERROR) { ALOGW("[%s] fails to process to an entry.\n", this->name.string()); break; Loading
cmds/statsd/benchmark/log_event_benchmark.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -54,9 +54,9 @@ static void getSimpleLogMsgData(log_msg* msg) { write4Bytes(99 /* a value to log*/, &buffer); buffer.push_back(EVENT_TYPE_LIST_STOP); msg->entry_v1.len = buffer.size(); msg->entry.len = buffer.size(); msg->entry.hdr_size = kLogMsgHeaderSize; msg->entry_v1.sec = time(nullptr); msg->entry.sec = time(nullptr); std::copy(buffer.begin(), buffer.end(), msg->buf + kLogMsgHeaderSize); } Loading
cmds/statsd/src/logd/LogEvent.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -38,8 +38,8 @@ using std::vector; LogEvent::LogEvent(log_msg& msg) { mContext = create_android_log_parser(msg.msg() + sizeof(uint32_t), msg.len() - sizeof(uint32_t)); mLogdTimestampNs = msg.entry_v1.sec * NS_PER_SEC + msg.entry_v1.nsec; mLogUid = msg.entry_v4.uid; mLogdTimestampNs = msg.entry.sec * NS_PER_SEC + msg.entry.nsec; mLogUid = msg.entry.uid; init(mContext); if (mContext) { // android_log_destroy will set mContext to NULL Loading