Skip to content

Commit

Permalink
Windows: COM server: remove log time stamp
Browse files Browse the repository at this point in the history
The space allocation for the time stamp is retained in case we
need it later on.
  • Loading branch information
jgressmann committed Apr 4, 2022
1 parent 036e7ba commit 7ae98e6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Windows/inc/supercan_srv.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ struct sc_mm_log_data {
uint8_t flags;
uint8_t bytes;
uint8_t src;
uint8_t reserved[3];
uint64_t timestamp_qpc;
uint8_t reserved0[3];
uint64_t reserved1;
uint8_t data[SC_LOG_DATA_BUFFER_SIZE]; ///< UTF-8
};

Expand Down
10 changes: 5 additions & 5 deletions Windows/srv/CoSuperCAN.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ class ScDev : public std::enable_shared_from_this<ScDev>
};

struct log_entry {
uint64_t timestamp_qpc;
//uint64_t timestamp_qpc;
int8_t level;
uint8_t src;
uint8_t bytes;
Expand Down Expand Up @@ -596,7 +596,7 @@ void ScDev::StoreLogMessage(log_entry const * const e)
slot->log_data.type = SC_MM_DATA_TYPE_LOG_DATA;
slot->log_data.level = e->level;
slot->log_data.src = e->src;
slot->log_data.timestamp_qpc = e->timestamp_qpc;
//slot->log_data.timestamp_qpc = e->timestamp_qpc;
slot->log_data.flags = flags;
slot->log_data.bytes = count;
memcpy(slot->log_data.data, e->data + offset, count);
Expand Down Expand Up @@ -1014,7 +1014,7 @@ void ScDev::Log(int level, const char* msg, size_t bytes)
const unsigned index = m_LogRingPutIndex % _countof(m_LogRingBuffer);
log_entry* const e = &m_LogRingBuffer[index];

QueryPerformanceCounter((LARGE_INTEGER*)&e->timestamp_qpc);
//QueryPerformanceCounter((LARGE_INTEGER*)&e->timestamp_qpc);
e->level = static_cast<int8_t>(level);
e->src = SC_LOG_DATA_SRC_DLL;
e->bytes = static_cast<uint8_t>(std::min(_countof(e->data) - 1, bytes));
Expand Down Expand Up @@ -1048,7 +1048,7 @@ void ScDev::LogFormatQueue(int level, const char* fmt, ...)

e->level = static_cast<int8_t>(level);
e->src = SC_LOG_DATA_SRC_SRV;
QueryPerformanceCounter((LARGE_INTEGER*)&e->timestamp_qpc);
//QueryPerformanceCounter((LARGE_INTEGER*)&e->timestamp_qpc);

va_start(vl, fmt);

Expand Down Expand Up @@ -1077,7 +1077,7 @@ void ScDev::LogFormatDirect(int level, const char* fmt, ...)

e.src = SC_LOG_DATA_SRC_SRV;
e.level = static_cast<int8_t>(level);
QueryPerformanceCounter((LARGE_INTEGER*)&e.timestamp_qpc);
//QueryPerformanceCounter((LARGE_INTEGER*)&e.timestamp_qpc);


va_start(vl, fmt);
Expand Down

0 comments on commit 7ae98e6

Please sign in to comment.