!485 hiperf适配微内核tracepoint路径归一

Merge pull request !485 from yuyanqing/master
This commit is contained in:
openharmony_ci 2024-05-17 10:17:42 +00:00 committed by Gitee
commit 3f84fc6107
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 0 additions and 7 deletions

View File

@ -694,9 +694,6 @@ void PerfEvents::LoadTracepointEventTypesFromSystem()
{
if (traceConfigTable.empty()) {
std::string basePath {"/sys/kernel/tracing/events"};
if (isHM_) {
basePath = "/sys/kernel/tracing/hongmeng/events";
}
if (access(basePath.c_str(), R_OK) != 0) {
basePath = "/sys/kernel/debug/tracing/events";
}

View File

@ -58,7 +58,6 @@ const std::string PERF_EVENT_MAX_SAMPLE_RATE = "/proc/sys/kernel/perf_event_max_
const std::string PERF_EVENT_MLOCK_KB = "/proc/sys/kernel/perf_event_mlock_kb";
const std::string SCHED_SWITCH = "/sys/kernel/tracing/events/sched/sched_switch/enable";
const std::string SCHED_SWITCH_DEBUG = "/sys/kernel/debug/tracing/events/sched/sched_switch/enable";
const std::string SCHED_SWITCH_HM = "/sys/kernel/tracing/hongmeng/events/sched/sched_switch/enable";
const std::string PROC_VERSION = "/proc/version";
const std::string SAVED_CMDLINES_SIZE = "/sys/kernel/tracing/saved_cmdlines_size";
@ -741,9 +740,6 @@ bool SubCommandRecord::TraceOffCpu()
// whether system support sched_switch event
int enable = -1;
std::string node = SCHED_SWITCH;
if (isHM_) {
node = SCHED_SWITCH_HM;
}
const std::string nodeDebug = SCHED_SWITCH_DEBUG;
if (!ReadIntFromProcFile(node.c_str(), enable) and
!ReadIntFromProcFile(nodeDebug.c_str(), enable)) {