mirror of
https://gitee.com/openharmony/hiviewdfx_hitrace
synced 2024-11-27 01:50:45 +00:00
!590 Alarm cleaning and fix hitrace tool parsing
Merge pull request !590 from Federer-JC/master
This commit is contained in:
commit
5d9b6fad1b
@ -452,7 +452,7 @@ def parse_smbus_result(data, one_event):
|
||||
|
||||
protocol_map = {0: "QUICK", 1: "BYTE", 2: "BYTE_DATA", 3: "WORD_DATA", \
|
||||
4: "PROC_CALL", 5: "BLOCK_DATA", 6: "I2C_BLOCK_BROKEN", 7: "BLOCK_PROC_CALL", 8: "I2C_BLOCK_DATA"}
|
||||
read_write = "wr" if read_write_value == 0 else "rd"
|
||||
read_write = "wr" if read_write_value == 0 else "rd"
|
||||
|
||||
return "i2c-%d a=%03x f=%04x c=%x %s %s res=%d" \
|
||||
% (adapter_nr, addr, flags, command, protocol_map.get(protocol, ''), read_write, res)
|
||||
|
@ -179,7 +179,7 @@ void DelOldRecordTraceFile(const int& fileLimit)
|
||||
}
|
||||
|
||||
size_t deleteNum = fileList.size() - traceFileLimit;
|
||||
for (int i = 0; i < deleteNum; ++i) {
|
||||
for (size_t i = 0; i < deleteNum; ++i) {
|
||||
if (remove((TRACE_DEFAULT_DIR + fileList[i].filename).c_str()) == 0) {
|
||||
HILOG_INFO(LOG_CORE, "DelOldRecordTraceFile: delete first: %{public}s success.",
|
||||
fileList[i].filename.c_str());
|
||||
@ -192,7 +192,7 @@ void DelOldRecordTraceFile(const int& fileLimit)
|
||||
|
||||
void ClearOldTraceFile(std::vector<std::string>& fileLists, const int& fileLimit)
|
||||
{
|
||||
if (fileLists.size() <= 0) {
|
||||
if (fileLists.size() == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user