Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0
0002 /*
0003  * Copyright(C) 2015 Linaro Limited. All rights reserved.
0004  * Author: Mathieu Poirier <mathieu.poirier@linaro.org>
0005  */
0006 
0007 #include <string.h>
0008 #include <linux/coresight-pmu.h>
0009 #include <linux/perf_event.h>
0010 #include <linux/string.h>
0011 
0012 #include "arm-spe.h"
0013 #include "../../../util/pmu.h"
0014 
0015 struct perf_event_attr
0016 *perf_pmu__get_default_config(struct perf_pmu *pmu __maybe_unused)
0017 {
0018 #ifdef HAVE_AUXTRACE_SUPPORT
0019     if (!strcmp(pmu->name, CORESIGHT_ETM_PMU_NAME)) {
0020         /* add ETM default config here */
0021         pmu->selectable = true;
0022 #if defined(__aarch64__)
0023     } else if (strstarts(pmu->name, ARM_SPE_PMU_NAME)) {
0024         return arm_spe_pmu_default_config(pmu);
0025 #endif
0026     }
0027 
0028 #endif
0029     return NULL;
0030 }