mirror of
https://gitee.com/openharmony/developtools_hiperf
synced 2024-11-23 15:39:47 +00:00
!485 hiperf适配微内核tracepoint路径归一
Merge pull request !485 from yuyanqing/master
This commit is contained in:
commit
3f84fc6107
@ -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";
|
||||
}
|
||||
|
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user