2 * Copyright (C) ARM Limited 2013-2014. All rights reserved.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
16 // If debugfs is not mounted at /sys/kernel/debug, update DEBUGFS_PATH
17 #define DEBUGFS_PATH "/sys/kernel/debug"
18 #define EVENTS_PATH DEBUGFS_PATH "/tracing/events"
20 #define SCHED_SWITCH "sched/sched_switch"
21 #define CPU_IDLE "power/cpu_idle"
27 class PerfDriver : public SimpleDriver {
32 bool getLegacySupport() const { return mLegacySupport; }
35 bool summary(Buffer *const buffer);
36 void coreName(const uint32_t startTime, Buffer *const buffer, const int cpu);
37 bool isSetup() const { return mIsSetup; }
39 void setupCounter(Counter &counter);
41 bool enable(const uint64_t currTime, PerfGroup *const group, Buffer *const buffer) const;
43 static long long getTracepointId(const char *const name, DynBuf *const printb);
46 void addCpuCounters(const char *const counterName, const int type, const int numCounters);
47 void addUncoreCounters(const char *const counterName, const int type, const int numCounters);
52 // Intentionally undefined
53 PerfDriver(const PerfDriver &);
54 PerfDriver &operator=(const PerfDriver &);
57 #endif // PERFDRIVER_H