mirror of
https://gitee.com/openharmony/hiviewdfx_hitrace
synced 2025-02-18 16:40:08 +00:00
告警清理
Signed-off-by:Federer-JC <jincong4@huawei.com> Signed-off-by: Federer-JC <jincong4@huawei.com>
This commit is contained in:
parent
ee24d228f9
commit
16601de68b
@ -172,7 +172,7 @@ bool ParseTagsParam(const napi_env& env, const napi_value& value, uint64_t& tags
|
||||
|
||||
bool JsStrNumParamsFunc(napi_env& env, napi_callback_info& info, STR_NUM_PARAM_FUNC nativeCall)
|
||||
{
|
||||
size_t argc = ARGC_NUMBER_TWO;
|
||||
size_t argc = static_cast<size_t>(ARGC_NUMBER_TWO);
|
||||
napi_value argv[ARGC_NUMBER_TWO];
|
||||
ParseParams(env, info, argc, argv);
|
||||
if (argc != ARGC_NUMBER_TWO) {
|
||||
|
@ -109,7 +109,7 @@ void InitHiTraceCommunicationModeEnum(napi_env env,
|
||||
commuicationModeMap["DEVICE"] = deviceMode;
|
||||
}
|
||||
|
||||
void InitConstClassByName(napi_env env, napi_value exports, std::string name)
|
||||
void InitConstClassByName(napi_env env, napi_value exports, const std::string name)
|
||||
{
|
||||
std::map<const char*, napi_value> propertyMap;
|
||||
if (name == HITRACE_FLAG_ENUM_NAME) {
|
||||
|
@ -115,7 +115,7 @@ std::vector<std::pair<std::string, int>> GetTraceFilesTable();
|
||||
/**
|
||||
* Set g_traceFilesTable.
|
||||
*/
|
||||
void SetTraceFilesTable(std::vector<std::pair<std::string, int>>& traceFilesTable);
|
||||
void SetTraceFilesTable(const std::vector<std::pair<std::string, int>>& traceFilesTable);
|
||||
} // Hitrace
|
||||
|
||||
}
|
||||
|
@ -548,7 +548,8 @@ void SetTimeIntervalBoundary()
|
||||
} else {
|
||||
struct timespec bts = {0, 0};
|
||||
clock_gettime(CLOCK_BOOTTIME, &bts);
|
||||
g_traceStartTime = bts.tv_sec * S_TO_NS + bts.tv_nsec - static_cast<uint64_t>(g_inputMaxDuration) * S_TO_NS;
|
||||
g_traceStartTime = static_cast<uint64_t>(bts.tv_sec * S_TO_NS + bts.tv_nsec) -
|
||||
static_cast<uint64_t>(g_inputMaxDuration) * S_TO_NS;
|
||||
g_traceEndTime = std::numeric_limits<uint64_t>::max();
|
||||
}
|
||||
} else {
|
||||
@ -579,7 +580,7 @@ void GetFileSizeThresholdAndTraceTime(bool &isCpuRaw, uint8_t contentType, uint6
|
||||
|
||||
bool IsWriteFileOverflow(const int &outputFileSize, const ssize_t &writeLen, const int &fileSizeThreshold)
|
||||
{
|
||||
if (outputFileSize + writeLen + sizeof(TraceFileContentHeader) >= fileSizeThreshold) {
|
||||
if (outputFileSize + writeLen + static_cast<int>(sizeof(TraceFileContentHeader)) >= fileSizeThreshold) {
|
||||
HILOG_ERROR(LOG_CORE, "Failed to write, current round write file size exceeds the file size limit.");
|
||||
return false;
|
||||
}
|
||||
@ -1133,7 +1134,6 @@ void SetProcessName(std::string& processName)
|
||||
void TimeoutSignalHandler(int signum)
|
||||
{
|
||||
if (signum == SIGUSR1) {
|
||||
HILOG_ERROR(LOG_CORE, "child process being terminated by parent process.");
|
||||
_exit(EXIT_SUCCESS);
|
||||
}
|
||||
}
|
||||
@ -1626,7 +1626,7 @@ TraceRetInfo DumpTrace(int maxDuration, uint64_t traceEndTime)
|
||||
std::time_t boot_time = now - info.uptime;
|
||||
if (traceEndTime > static_cast<uint64_t>(boot_time)) {
|
||||
// beware of input precision of seconds: add an extra second of tolerance
|
||||
g_inputTraceEndTime = (traceEndTime - boot_time + 1) * S_TO_NS;
|
||||
g_inputTraceEndTime = (traceEndTime - static_cast<uint64_t>(boot_time) + 1) * S_TO_NS;
|
||||
} else {
|
||||
HILOG_ERROR(LOG_CORE, "DumpTrace: Illegal input: traceEndTime is earlier than system boot time.");
|
||||
ret.errorCode = OUT_OF_TIME;
|
||||
@ -1729,7 +1729,7 @@ std::vector<std::pair<std::string, int>> GetTraceFilesTable()
|
||||
return g_traceFilesTable;
|
||||
}
|
||||
|
||||
void SetTraceFilesTable(std::vector<std::pair<std::string, int>>& traceFilesTable)
|
||||
void SetTraceFilesTable(const std::vector<std::pair<std::string, int>>& traceFilesTable)
|
||||
{
|
||||
g_traceFilesTable = traceFilesTable;
|
||||
}
|
||||
|
@ -127,7 +127,7 @@ def parse_text_trace_file():
|
||||
if trace_match_async:
|
||||
line = line.rstrip(' ')
|
||||
pos = line.rfind(' ')
|
||||
line = "%s%s%s" % (line[:pos], '|', line[pos+1:])
|
||||
line = "%s%s%s" % (line[:pos], '|', line[pos + 1:])
|
||||
match_num += 1
|
||||
elif trace_match_sync:
|
||||
line = "%s\n" % (line.rstrip()[:-1])
|
||||
|
@ -22,10 +22,10 @@ def parse_bytes_to_str(data):
|
||||
return decoded_str
|
||||
|
||||
if data.find(b'\x00') == -1:
|
||||
decoded_str = data[:].decode('utf-8', errors = "ignore")
|
||||
decoded_str = data[:].decode('utf-8', errors ="ignore")
|
||||
return decoded_str
|
||||
|
||||
decoded_str = data[:data.index(b'\x00')].decode('utf-8', errors = "ignore")
|
||||
decoded_str = data[:data.index(b'\x00')].decode('utf-8', errors ="ignore")
|
||||
|
||||
return decoded_str
|
||||
|
||||
@ -82,7 +82,7 @@ def parse_sched_switch_hm(data, one_event):
|
||||
prev_state = pstate_map.get(pstate, '?')
|
||||
|
||||
return "prev_comm=%s prev_pid=%d prev_prio=%d prev_state=%s ==> next_comm=%s next_pid=%d next_prio=%d" \
|
||||
% (pname, prev_tid, pprio, prev_state, nname, next_tid, nprio)
|
||||
% (pname, prev_tid, pprio, prev_state, nname, next_tid, nprio)
|
||||
|
||||
|
||||
def parse_sched_switch(data, one_event):
|
||||
@ -124,7 +124,7 @@ def parse_sched_blocked_reason_hm(data, one_event):
|
||||
delay = parse_int_field(one_event, "delay", False)
|
||||
|
||||
return "pid=%d iowait=%d caller=%s+0x%lx/0x%lx[%s] delay=%d" \
|
||||
% (pid, iowait, func_name, offset, size, mod_name, delay >> 10)
|
||||
% (pid, iowait, func_name, offset, size, mod_name, delay >> 10)
|
||||
|
||||
|
||||
def parse_sched_blocked_reason(data, one_event):
|
||||
@ -182,7 +182,7 @@ def parse_ext4_da_write_begin(data, one_event):
|
||||
flags = parse_int_field(one_event, "flags", False)
|
||||
|
||||
return "dev %d,%d ino %d pos %d len %d flags %d" \
|
||||
% (dev >> 20, dev & 0xfffff, ino, pos, len_write, flags)
|
||||
% (dev >> 20, dev & 0xfffff, ino, pos, len_write, flags)
|
||||
|
||||
|
||||
def parse_ext4_da_write_end(data, one_event):
|
||||
@ -193,7 +193,7 @@ def parse_ext4_da_write_end(data, one_event):
|
||||
copied = parse_int_field(one_event, "copied", False)
|
||||
|
||||
return "dev %d,%d ino %d pos %d len %d copied %d" \
|
||||
% (dev >> 20, dev & 0xfffff, ino, pos, len_write, copied)
|
||||
% (dev >> 20, dev & 0xfffff, ino, pos, len_write, copied)
|
||||
|
||||
|
||||
def parse_ext4_sync_file_enter(data, one_event):
|
||||
@ -203,7 +203,7 @@ def parse_ext4_sync_file_enter(data, one_event):
|
||||
datasync = parse_int_field(one_event, "datasync", True)
|
||||
|
||||
return "dev %d,%d ino %d parent %d datasync %d " \
|
||||
% (dev >> 20, dev & 0xfffff, ino, parent, datasync)
|
||||
% (dev >> 20, dev & 0xfffff, ino, parent, datasync)
|
||||
|
||||
|
||||
def parse_ext4_sync_file_exit(data, one_event):
|
||||
@ -222,7 +222,7 @@ def parse_block_bio_remap(data, one_event):
|
||||
rwbs = parse_bytes_to_str(one_event["fields"]["rwbs[8]"])
|
||||
|
||||
return "%d,%d %s %d + %d <- (%d,%d) %d" \
|
||||
% (dev >> 20, dev & 0xfffff, rwbs, sector, nr_sector, old_dev >> 20, old_dev & 0xfffff, old_sector)
|
||||
% (dev >> 20, dev & 0xfffff, rwbs, sector, nr_sector, old_dev >> 20, old_dev & 0xfffff, old_sector)
|
||||
|
||||
|
||||
def parse_block_rq_issue_hm(data, one_event):
|
||||
@ -235,7 +235,7 @@ def parse_block_rq_issue_hm(data, one_event):
|
||||
cmd = parse_bytes_to_str(one_event["fields"]["cmd[16]"])
|
||||
|
||||
return "%d,%d %s %d (%s) %d + %d [%s]" \
|
||||
% (dev >> 20, dev & 0xfffff, rwbs, bytes_num, cmd, sector, nr_sector, comm)
|
||||
% (dev >> 20, dev & 0xfffff, rwbs, bytes_num, cmd, sector, nr_sector, comm)
|
||||
|
||||
|
||||
def parse_block_rq_issue_or_insert(data, one_event):
|
||||
@ -248,7 +248,7 @@ def parse_block_rq_issue_or_insert(data, one_event):
|
||||
cmd_pos = parse_int_field(one_event, "cmd", False) & 0xffff
|
||||
|
||||
return "%d,%d %s %d (%s) %d + %d [%s]" \
|
||||
% (dev >> 20, dev & 0xfffff, rwbs, bytes_num, parse_bytes_to_str(data[cmd_pos:]), sector, nr_sector, comm)
|
||||
% (dev >> 20, dev & 0xfffff, rwbs, bytes_num, parse_bytes_to_str(data[cmd_pos:]), sector, nr_sector, comm)
|
||||
|
||||
|
||||
def parse_block_rq_complete_hm(data, one_event):
|
||||
@ -260,7 +260,7 @@ def parse_block_rq_complete_hm(data, one_event):
|
||||
cmd = parse_bytes_to_str(one_event["fields"]["cmd[16]"])
|
||||
|
||||
return "%d,%d %s (%s) %d + %d [%d]" \
|
||||
% (dev >> 20, dev & 0xfffff, rwbs, cmd, sector, nr_sector, error)
|
||||
% (dev >> 20, dev & 0xfffff, rwbs, cmd, sector, nr_sector, error)
|
||||
|
||||
|
||||
def parse_block_rq_complete(data, one_event):
|
||||
@ -272,7 +272,7 @@ def parse_block_rq_complete(data, one_event):
|
||||
cmd_pos = parse_int_field(one_event, "cmd", False) & 0xffff
|
||||
|
||||
return "%d,%d %s (%s) %d + %d [%d]" \
|
||||
% (dev >> 20, dev & 0xfffff, rwbs, parse_bytes_to_str(data[cmd_pos:]), sector, nr_sector, error)
|
||||
% (dev >> 20, dev & 0xfffff, rwbs, parse_bytes_to_str(data[cmd_pos:]), sector, nr_sector, error)
|
||||
|
||||
|
||||
def parse_ufshcd_command_hm(data, one_event):
|
||||
@ -286,7 +286,7 @@ def parse_ufshcd_command_hm(data, one_event):
|
||||
opcode = parse_int_field(one_event, "opcode", False)
|
||||
|
||||
return "%s: %s: tag: %d, DB: 0x%x, size: %d, IS: %d, LBA: %d, opcode: 0x%x" \
|
||||
% (command_str, dev_name, tag, doorbell, transfer_len, intr, lba, opcode)
|
||||
% (command_str, dev_name, tag, doorbell, transfer_len, intr, lba, opcode)
|
||||
|
||||
|
||||
def parse_ufshcd_command(data, one_event):
|
||||
@ -304,8 +304,8 @@ def parse_ufshcd_command(data, one_event):
|
||||
0x28: "READ_10", 0x35: "SYNC", 0x42: "UNMAP"}
|
||||
|
||||
return "%s: %s: tag: %d, DB: 0x%x, size: %d, IS: %d, LBA: %d, opcode: 0x%x (%s), group_id: 0x%x" \
|
||||
% (parse_bytes_to_str(data[str_pos:]), parse_bytes_to_str(data[dev_name_pos:]), tag, doorbell, \
|
||||
transfer_len, intr, lba, opcode, opcode_map.get(opcode, ""), group_id)
|
||||
% (parse_bytes_to_str(data[str_pos:]), parse_bytes_to_str(data[dev_name_pos:]), tag, doorbell, \
|
||||
transfer_len, intr, lba, opcode, opcode_map.get(opcode, ""), group_id)
|
||||
|
||||
|
||||
def parse_ufshcd_upiu(data, one_event):
|
||||
@ -315,7 +315,7 @@ def parse_ufshcd_upiu(data, one_event):
|
||||
tsf = parse_int_field(one_event, "tsf[16]", False)
|
||||
|
||||
return "%s: %s: HDR:0x%x, CDB:0x%x" % (parse_bytes_to_str(data[str_pos:]), \
|
||||
parse_bytes_to_str(data[dev_name_pos:]), hdr, tsf)
|
||||
parse_bytes_to_str(data[dev_name_pos:]), hdr, tsf)
|
||||
|
||||
|
||||
def parse_ufshcd_uic_command(data, one_event):
|
||||
@ -327,7 +327,7 @@ def parse_ufshcd_uic_command(data, one_event):
|
||||
arg3 = parse_int_field(one_event, "arg3", False)
|
||||
|
||||
return "%s: %s: cmd: 0x%x, arg1: 0x%x, arg2: 0x%x, arg3: 0x%x" \
|
||||
% (parse_bytes_to_str(data[str_pos:]), parse_bytes_to_str(data[dev_name_pos:]), cmd, arg1, arg2, arg3)
|
||||
% (parse_bytes_to_str(data[str_pos:]), parse_bytes_to_str(data[dev_name_pos:]), cmd, arg1, arg2, arg3)
|
||||
|
||||
|
||||
def parse_ufshcd_funcs(data, one_event):
|
||||
@ -341,8 +341,8 @@ def parse_ufshcd_funcs(data, one_event):
|
||||
link_state_map = {0: "UIC_LINK_OFF_STATE", 1: "UIC_LINK_ACTIVE_STATE", 2: "UIC_LINK_HIBERN8_STATE"}
|
||||
|
||||
return "%s: took %d usecs, dev_state: %s, link_state: %s, err %d" \
|
||||
% (parse_bytes_to_str(data[dev_name_pos:]), usecs, dev_state_map.get(dev_state, ""), \
|
||||
link_state_map.get(link_state, ""), err)
|
||||
% (parse_bytes_to_str(data[dev_name_pos:]), usecs, dev_state_map.get(dev_state, ""), \
|
||||
link_state_map.get(link_state, ""), err)
|
||||
|
||||
|
||||
def parse_ufshcd_profile_funcs(data, one_event):
|
||||
@ -352,7 +352,7 @@ def parse_ufshcd_profile_funcs(data, one_event):
|
||||
err = parse_int_field(one_event, "err", True)
|
||||
|
||||
return "%s: %s: took %d usecs, err %d" \
|
||||
% (parse_bytes_to_str(data[dev_name_pos:]), parse_bytes_to_str(data[profile_info_pos:]), time_us, err)
|
||||
% (parse_bytes_to_str(data[dev_name_pos:]), parse_bytes_to_str(data[profile_info_pos:]), time_us, err)
|
||||
|
||||
|
||||
def parse_ufshcd_auto_bkops_state(data, one_event):
|
||||
@ -370,7 +370,7 @@ def parse_ufshcd_clk_scaling(data, one_event):
|
||||
curr_state = parse_int_field(one_event, "curr_state", False)
|
||||
|
||||
return "%s: %s %s from %d to %d Hz" % (parse_bytes_to_str(data[dev_name_pos:]), \
|
||||
parse_bytes_to_str(data[state_pos:]), parse_bytes_to_str(data[clk_pos:]), prev_state, curr_state)
|
||||
parse_bytes_to_str(data[state_pos:]), parse_bytes_to_str(data[clk_pos:]), prev_state, curr_state)
|
||||
|
||||
|
||||
def parse_ufshcd_clk_gating(data, one_event):
|
||||
@ -400,7 +400,7 @@ def parse_i2c_write_or_reply(data, one_event):
|
||||
len_write = parse_int_field(one_event, "len", False)
|
||||
buf_pos = parse_int_field(one_event, "buf", False) & 0xffff
|
||||
return ("i2c-%d #%d a=%03x f=%04x l=%d " % (adapter_nr, msg_nr, addr, flags, len_write)) \
|
||||
+ "{:{width}d}".format(int(parse_bytes_to_str(data[buf_pos:])), width=len_write)
|
||||
+ "{:{width}d}".format(int(parse_bytes_to_str(data[buf_pos:])), width=len_write)
|
||||
|
||||
|
||||
def parse_i2c_result(data, one_event):
|
||||
@ -419,7 +419,7 @@ def parse_smbus_read(data, one_event):
|
||||
protocol = parse_int_field(one_event, "protocol", False)
|
||||
|
||||
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"}
|
||||
4: "PROC_CALL", 5: "BLOCK_DATA", 6: "I2C_BLOCK_BROKEN", 7: "BLOCK_PROC_CALL", 8: "I2C_BLOCK_DATA"}
|
||||
|
||||
return "i2c-%d a=%03x f=%04x c=%x %s" % (adapter_nr, addr, flags, command, protocol_map.get(protocol, ''))
|
||||
|
||||
@ -434,11 +434,11 @@ def parse_smbus_write_or_reply(data, one_event):
|
||||
buf = parse_bytes_to_str(one_event["fields"]["buf[32 + 2]"])
|
||||
|
||||
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"}
|
||||
4: "PROC_CALL", 5: "BLOCK_DATA", 6: "I2C_BLOCK_BROKEN", 7: "BLOCK_PROC_CALL", 8: "I2C_BLOCK_DATA"}
|
||||
|
||||
return ("i2c-%d a=%03x f=%04x c=%x %s l=%d" \
|
||||
% (adapter_nr, addr, flags, command, protocol_map.get(protocol, ''), \
|
||||
len_write)) + "{:{width}d}".format(int(buf), width=len_write)
|
||||
% (adapter_nr, addr, flags, command, protocol_map.get(protocol, ''), \
|
||||
len_write)) + "{:{width}d}".format(int(buf), width=len_write)
|
||||
|
||||
|
||||
def parse_smbus_result(data, one_event):
|
||||
@ -451,11 +451,11 @@ def parse_smbus_result(data, one_event):
|
||||
protocol = parse_int_field(one_event, "protocol", False)
|
||||
|
||||
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"
|
||||
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"
|
||||
|
||||
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)
|
||||
% (adapter_nr, addr, flags, command, protocol_map.get(protocol, ''), read_write, res)
|
||||
|
||||
|
||||
def parse_regulator_set_voltage_complete(data, one_event):
|
||||
@ -486,7 +486,7 @@ def parse_dma_fence_funcs(data, one_event):
|
||||
seqno = parse_int_field(one_event, "seqno", False)
|
||||
|
||||
return "driver=%s timeline=%s context=%d seqno=%d" \
|
||||
% (parse_bytes_to_str(data[driver_pos:]), parse_bytes_to_str(data[timeline_pos:]), context, seqno)
|
||||
% (parse_bytes_to_str(data[driver_pos:]), parse_bytes_to_str(data[timeline_pos:]), context, seqno)
|
||||
|
||||
|
||||
def parse_binder_transaction(data, one_event):
|
||||
@ -499,7 +499,7 @@ def parse_binder_transaction(data, one_event):
|
||||
flags = parse_int_field(one_event, "flags", False)
|
||||
|
||||
return "transaction=%d dest_node=%d dest_proc=%d dest_thread=%d reply=%d flags=0x%x code=0x%x" \
|
||||
% (debug_id, target_node, to_proc, to_thread, reply, flags, code)
|
||||
% (debug_id, target_node, to_proc, to_thread, reply, flags, code)
|
||||
|
||||
|
||||
def parse_binder_transaction_received(data, one_event):
|
||||
@ -536,12 +536,12 @@ def parse_mmc_request_start(data, one_event):
|
||||
name = parse_bytes_to_str(one_event["fields"]["name"])
|
||||
|
||||
return "%s: start struct mmc_request[0x%x]: cmd_opcode=%d cmd_arg=0x%x cmd_flags=0x%x \
|
||||
cmd_retries=%d stop_opcode=%d stop_arg=0x%x stop_flags=0x%x stop_retries=%d sbc_opcode=%d \
|
||||
sbc_arg=0x%x sbc_flags=0x%x sbc_retires=%d blocks=%d block_size=%d blk_addr=%d data_flags=0x%x \
|
||||
tag=%d can_retune=%d doing_retune=%d retune_now=%d need_retune=%d hold_retune=%d retune_period=%d" \
|
||||
% (name, mrq, cmd_opcode, cmd_arg, cmd_flags, cmd_retries, stop_opcode, stop_arg, stop_flags, \
|
||||
stop_retries, sbc_opcode, sbc_arg, sbc_flags, sbc_retries, blocks, blksz, blk_addr, data_flags, \
|
||||
tag, can_retune, doing_retune, retune_now, need_retune, hold_retune, retune_period)
|
||||
cmd_retries=%d stop_opcode=%d stop_arg=0x%x stop_flags=0x%x stop_retries=%d sbc_opcode=%d \
|
||||
sbc_arg=0x%x sbc_flags=0x%x sbc_retires=%d blocks=%d block_size=%d blk_addr=%d data_flags=0x%x \
|
||||
tag=%d can_retune=%d doing_retune=%d retune_now=%d need_retune=%d hold_retune=%d retune_period=%d" \
|
||||
% (name, mrq, cmd_opcode, cmd_arg, cmd_flags, cmd_retries, stop_opcode, stop_arg, stop_flags, \
|
||||
stop_retries, sbc_opcode, sbc_arg, sbc_flags, sbc_retries, blocks, blksz, blk_addr, data_flags, \
|
||||
tag, can_retune, doing_retune, retune_now, need_retune, hold_retune, retune_period)
|
||||
|
||||
|
||||
def parse_mmc_request_done(data, one_event):
|
||||
@ -570,13 +570,13 @@ def parse_mmc_request_done(data, one_event):
|
||||
name = parse_bytes_to_str(one_event["fields"]["name"])
|
||||
|
||||
return "%s: end struct mmc_request[0x%x]: cmd_opcode=%d cmd_err=%d cmd_resp=0x%x 0x%x 0x%x 0x%x \
|
||||
cmd_retries=%d stop_opcode=%d stop_err=%d stop_resp=0x%x 0x%x 0x%x 0x%x stop_retries=%d sbc_opcode=%d \
|
||||
sbc_err=%d sbc_resp=0x%x 0x%x 0x%x 0x%x sbc_retries=%d bytes_xfered=%d data_err=%d tag=%d can_retune=%d \
|
||||
doing_retune=%d retune_now=%d need_retune=%d hold_retune=%d retune_period=%d" \
|
||||
% (name, mrq, cmd_opcode, cmd_err, cmd_resp[0], cmd_resp[1], cmd_resp[2], cmd_resp[3], cmd_retries, \
|
||||
stop_opcode, stop_err, stop_resp[0], stop_resp[1], stop_resp[2], stop_resp[3], stop_retries, sbc_opcode, \
|
||||
sbc_err, sbc_resp[0], sbc_resp[1], sbc_resp[2], sbc_resp[3], sbc_retries, bytes_xfered, data_err, tag, \
|
||||
can_retune, doing_retune, retune_now, need_retune, hold_retune, retune_period)
|
||||
cmd_retries=%d stop_opcode=%d stop_err=%d stop_resp=0x%x 0x%x 0x%x 0x%x stop_retries=%d sbc_opcode=%d \
|
||||
sbc_err=%d sbc_resp=0x%x 0x%x 0x%x 0x%x sbc_retries=%d bytes_xfered=%d data_err=%d tag=%d can_retune=%d \
|
||||
doing_retune=%d retune_now=%d need_retune=%d hold_retune=%d retune_period=%d" \
|
||||
% (name, mrq, cmd_opcode, cmd_err, cmd_resp[0], cmd_resp[1], cmd_resp[2], cmd_resp[3], cmd_retries, \
|
||||
stop_opcode, stop_err, stop_resp[0], stop_resp[1], stop_resp[2], stop_resp[3], stop_retries, sbc_opcode, \
|
||||
sbc_err, sbc_resp[0], sbc_resp[1], sbc_resp[2], sbc_resp[3], sbc_retries, bytes_xfered, data_err, tag, \
|
||||
can_retune, doing_retune, retune_now, need_retune, hold_retune, retune_period)
|
||||
|
||||
|
||||
def parse_file_check_and_advance_wb_err(data, one_event):
|
||||
@ -587,7 +587,7 @@ def parse_file_check_and_advance_wb_err(data, one_event):
|
||||
new = parse_int_field(one_event, "new", False)
|
||||
|
||||
return "file=0x%x dev=%d:%d ino=0x%x old=0x%x new=0x%x" \
|
||||
% (file, s_dev >> 20, s_dev & 0xfffff, i_ino, old, new)
|
||||
% (file, s_dev >> 20, s_dev & 0xfffff, i_ino, old, new)
|
||||
|
||||
|
||||
def parse_filemap_set_wb_err(data, one_event):
|
||||
@ -596,7 +596,7 @@ def parse_filemap_set_wb_err(data, one_event):
|
||||
errseq = parse_int_field(one_event, "errseq", False)
|
||||
|
||||
return "dev=%d:%d ino=0x%x errseq=0x%x" \
|
||||
% (s_dev >> 20, s_dev & 0xfffff, i_ino, errseq)
|
||||
% (s_dev >> 20, s_dev & 0xfffff, i_ino, errseq)
|
||||
|
||||
|
||||
def parse_mm_filemap_add_or_delete_page_cache(data, one_event):
|
||||
@ -607,7 +607,7 @@ def parse_mm_filemap_add_or_delete_page_cache(data, one_event):
|
||||
pg = parse_int_field(one_event, "pg", False)
|
||||
|
||||
return "dev %d:%d ino 0x%x page=0x%x pfn=%d ofs=%d" \
|
||||
% (s_dev >> 20, s_dev & 0xfffff, i_ino, pg, pfn, index << 12)
|
||||
% (s_dev >> 20, s_dev & 0xfffff, i_ino, pg, pfn, index << 12)
|
||||
|
||||
|
||||
def parse_rss_stat(data, one_event):
|
||||
@ -639,12 +639,13 @@ def parse_thermal_power_allocator(data, one_event):
|
||||
delta_temp = parse_int_field(one_event, "delta_temp", True)
|
||||
|
||||
req_power = "{" + ", ".join(str(x) for x in list(data[req_power_pos:req_power_pos + num_actors * 4])) + "}"
|
||||
granted_power = "{" + ", ".join(str(x) for x in list(data[granted_power_pos:granted_power_pos + num_actors * 4])) + "}"
|
||||
granted_power = "{" + \
|
||||
", ".join(str(x) for x in list(data[granted_power_pos:granted_power_pos + num_actors * 4])) + "}"
|
||||
|
||||
return "thermal_zone_id=%d req_power=%s total_req_power=%d granted_power=%s total_granted_power=%d \
|
||||
power_range=%d max_allocatable_power=%d current_temperature=%d delta_temperature=%d" \
|
||||
% (tz_id, req_power, total_req_power, granted_power, total_granted_power, power_range, \
|
||||
max_allocatable_power, current_temp, delta_temp)
|
||||
power_range=%d max_allocatable_power=%d current_temperature=%d delta_temperature=%d" \
|
||||
% (tz_id, req_power, total_req_power, granted_power, total_granted_power, power_range, \
|
||||
max_allocatable_power, current_temp, delta_temp)
|
||||
|
||||
|
||||
def parse_thermal_power_allocator_pid(data, one_event):
|
||||
@ -657,7 +658,7 @@ def parse_thermal_power_allocator_pid(data, one_event):
|
||||
output = parse_int_field(one_event, "output", True)
|
||||
|
||||
return "thermal_zone_id=%d err=%d err_integral=%d p=%d i=%d d=%d output=%d" \
|
||||
% (tz_id, err, err_integral, p, i, d, output)
|
||||
% (tz_id, err, err_integral, p, i, d, output)
|
||||
|
||||
|
||||
def parse_print(data, one_event):
|
||||
|
Loading…
x
Reference in New Issue
Block a user