diff --git a/trace_streamer/src/base/file.h b/trace_streamer/src/base/file.h index 931fc18e41b2c9d612bcbd2b37ed75c43338aa66..9f5eedb7038f0edc7b1b04b23dd06329d7760a07 100644 --- a/trace_streamer/src/base/file.h +++ b/trace_streamer/src/base/file.h @@ -43,7 +43,7 @@ int32_t OpenFile(const std::string &path, int32_t flags, uint32_t mode = K_FILE_ std::string GetExecutionDirectoryPath(); #ifdef is_linux -std::vector GetFilesNameFromDir(const std::string &fileDir); +std::vector GetFilesNameFromDir(const std::string &path); #endif } // namespace base } // namespace SysTuning diff --git a/trace_streamer/src/parser/rawtrace_parser/cpu_detail_parser.cpp b/trace_streamer/src/parser/rawtrace_parser/cpu_detail_parser.cpp index 527e7a4284c1cdb6a9be900b6c831c768f09005c..8af52df4e3e39a92ecd18d2a030a5aff5076ab7c 100644 --- a/trace_streamer/src/parser/rawtrace_parser/cpu_detail_parser.cpp +++ b/trace_streamer/src/parser/rawtrace_parser/cpu_detail_parser.cpp @@ -156,6 +156,10 @@ void CpuDetailParser::VoltageEventInitialization() } void CpuDetailParser::EventAppend(std::shared_ptr event) { + if (event->cpuId >= standAloneCpuEventList_.size()) { + TS_LOGW("cpuId: %u is invailed", event->cpuId); + return; + } standAloneCpuEventList_[event->cpuId].emplace(std::move(event)); curRawTraceEventNum_++; }