46static inline int GetTids(
const char *argv)
51static inline int GetPids(
const char *argv)
69#ifdef LOSCFG_PERF_HW_PMU
78#elif defined LOSCFG_PERF_TIMED_PMU
84#elif defined LOSCFG_PERF_SW_PMU
119 printf(
"perf stat attr init failed\n");
125 printf(
"parse error\n");
131 printf(
"perf config failed\n");
138 printf(
"fork error\n");
140 }
else if (child == 0) {
145 (
void)waitpid(child, 0, 0);
void PerfStart(int fd, size_t sectionId)
int PerfConfig(int fd, PerfConfigAttr *attr)
@ PERF_COUNT_SW_IRQ_RESPONSE
@ PERF_COUNT_SW_TASK_SWITCH
@ PERF_COUNT_SW_MEM_ALLOC
@ PERF_COUNT_HW_DCACHE_REFERENCES
@ PERF_COUNT_HW_ICACHE_REFERENCES
@ PERF_COUNT_HW_CPU_CYCLES
@ PERF_COUNT_HW_INSTRUCTIONS
int ParseIds(const char *argv, int *arr, unsigned int *len)
int ParseEvents(const char *argv, PerfEventConfig *eventsCfg, unsigned int *len)
int ParseOptions(int argc, char **argv, PerfOption *opt, SubCmd *cmd)
static int GetTids(const char *argv)
static int GetEvents(const char *argv)
static int PerfStatAttrInit(void)
static PerfConfigAttr g_statAttr
static int GetPids(const char *argv)
static PerfOption g_statOpts[]
void PerfStat(int fd, int argc, char **argv)
unsigned int processIdsNr
PerfEventConfig eventsCfg
unsigned int processIds[PERF_MAX_FILTER_TSKS]
unsigned int taskIds[PERF_MAX_FILTER_TSKS]
struct PerfEventConfig::@0 events[PERF_MAX_EVENT]
char * params[CMD_MAX_PARAMS]
ARG_NUM_3 ARG_NUM_1 ARG_NUM_2 ARG_NUM_2 ARG_NUM_3 ARG_NUM_1 ARG_NUM_4 ARG_NUM_2 ARG_NUM_2 ARG_NUM_5 ARG_NUM_2 void