mirror of
https://gitee.com/openharmony/hiviewdfx_hitrace
synced 2024-11-23 07:49:43 +00:00
fix:1.epoll_wait添加错误码打印; 2.dumptrace添加endtime打印
Signed-off-by: jiangwei <jiangwei214@h-partners.com>
This commit is contained in:
parent
dda459513b
commit
b423489ab9
@ -1040,7 +1040,7 @@ bool EpollWaitforChildProcess(pid_t &pid, int &pipefd)
|
||||
constexpr int waitTimeoutMs = 10000; // 10000ms = 10s
|
||||
int numEvents = epoll_wait(epollfd, events, 1, waitTimeoutMs);
|
||||
if (numEvents == -1) {
|
||||
HILOG_ERROR(LOG_CORE, "epoll_wait error.");
|
||||
HILOG_ERROR(LOG_CORE, "epoll_wait error, error: (%{public}s).", strerror(errno));
|
||||
close(pipefd);
|
||||
close(epollfd);
|
||||
return false;
|
||||
@ -1058,7 +1058,7 @@ bool EpollWaitforChildProcess(pid_t &pid, int &pipefd)
|
||||
close(pipefd);
|
||||
close(epollfd);
|
||||
if (waitpid(pid, nullptr, 0) <= 0) {
|
||||
HILOG_ERROR(LOG_CORE, "wait HitraceDump(%{public}d) exit failed, errno(%{public}d)", pid, errno);
|
||||
HILOG_ERROR(LOG_CORE, "wait HitraceDump(%{public}d) exit failed, errno: (%{public}d)", pid, errno);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -1449,7 +1449,8 @@ TraceRetInfo DumpTrace()
|
||||
|
||||
TraceRetInfo DumpTrace(int maxDuration, uint64_t traceEndTime)
|
||||
{
|
||||
HILOG_INFO(LOG_CORE, "DumpTrace with time limit start, time limit is %{public}d.", maxDuration);
|
||||
HILOG_INFO(LOG_CORE, "DumpTrace with timelimit start, timelimit is %{public}d, endtime is (%{public}" PRId64 ").",
|
||||
maxDuration, traceEndTime);
|
||||
TraceRetInfo ret;
|
||||
if (maxDuration < 0) {
|
||||
HILOG_ERROR(LOG_CORE, "DumpTrace: Illegal input.");
|
||||
|
Loading…
Reference in New Issue
Block a user