diff --git a/include/pmu.h b/include/pmu.h index f2cb5904f8fe6bdb8bfcf4c64a5355457f439478..aa9a723e1bbb6748cb14cd4654a5bda70edf623a 100644 --- a/include/pmu.h +++ b/include/pmu.h @@ -139,14 +139,6 @@ int PmuOpen(enum PmuTaskType collectType, struct PmuAttr *attr); */ const char** PmuEventList(enum PmuEventType eventType, unsigned *numEvt); -/** - * @brief - * Free eventList pointer. - * @param eventList event list - * @param numEvt length of event list - */ -void PmuEventListFree(); - /** * @brief * Enable counting or sampling of task . diff --git a/pmu/pmu_event_list.cpp b/pmu/pmu_event_list.cpp index 5be2d87afe6f4aaf0cba5990c417b8193f4b527d..849ec9a6efb3a322489fdb886c11833663d9f29b 100644 --- a/pmu/pmu_event_list.cpp +++ b/pmu/pmu_event_list.cpp @@ -1,9 +1,17 @@ -/** - * @copyright Copyright (c) Huawei Technologies Co., Ltd. 2023-2023. All rights reserved. - * @brief - * @version 24.0 - * @date 2024-04-18 - */ +/****************************************************************************** + * Copyright (c) Huawei Technologies Co., Ltd. 2024. All rights reserved. + * gala-gopher licensed under the Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR + * PURPOSE. + * See the Mulan PSL v2 for more details. + * Author: Mr.Ye + * Create: 2024-04-03 + * Description: definitions of interfaces of querying and freeing pmu event list + ******************************************************************************/ #include #include #include diff --git a/pmu/pmu_event_list.h b/pmu/pmu_event_list.h new file mode 100644 index 0000000000000000000000000000000000000000..82832df5c76c10d300b37b4742d79725aecf6a01 --- /dev/null +++ b/pmu/pmu_event_list.h @@ -0,0 +1,20 @@ +/****************************************************************************** + * Copyright (c) Huawei Technologies Co., Ltd. 2024. All rights reserved. + * gala-gopher licensed under the Mulan PSL v2. + * You can use this software according to the terms and conditions of the Mulan PSL v2. + * You may obtain a copy of Mulan PSL v2 at: + * http://license.coscl.org.cn/MulanPSL2 + * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR + * PURPOSE. + * See the Mulan PSL v2 for more details. + * Author: Mr.Ye + * Create: 2024-04-03 + * Description: declaration of interface of freeing pmu event list + ******************************************************************************/ +#ifndef PMU_EVENT_LIST_H +#define PMU_EVENT_LIST_H + +void PmuEventListFree(); + +#endif // PMU_EVENT_LIST_H diff --git a/pmu/pmu_list.cpp b/pmu/pmu_list.cpp index 0d1c0a71163160ca59d75354be1270b595290353..e79b854f034f304b392f0b4758307a85867609fe 100644 --- a/pmu/pmu_list.cpp +++ b/pmu/pmu_list.cpp @@ -23,6 +23,7 @@ #include "pcerr.h" #include "util_time.h" #include "log.h" +#include "pmu_event_list.h" #include "pmu_list.h" #include "common.h"