1 /******************************************************************************
3 * Copyright (c) 2020 Intel.
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
17 *******************************************************************************/
19 #ifndef _APP_PROFILE_XRAN_H_
20 #define _APP_PROFILE_XRAN_H_
28 struct xran_mlog_times
30 uint64_t ticks_per_usec;
31 uint64_t core_total_time; /* in us */
32 uint64_t core_used_time; /* in us */
33 uint64_t xran_total_time; /* in us */
34 uint64_t mlog_total_time; /* in us */
37 struct xran_mlog_stats
45 struct xran_mlog_taskid
52 enum xran_mlog_task_type {
53 XRAN_TASK_TYPE_GNB = 0,
59 XRAN_TASK_TYPE_MAX, /* The last entry : total# of types */
62 #define XRAN_REPORT_FILE "xran_mlog_stats"
65 int32_t app_profile_xran_print_mlog_stats(char *usecase_file);
67 #define app_profile_xran_print_mlog_stats(a)
72 #define print_err(fmt, args...) printf("%s:[err] " fmt "\n", __FUNCTION__, ## args)
73 #else /* PRINTF_LOG_OK */
74 #define print_err(fmt, args...)
75 #endif /* PRINTF_LOG_OK */
77 #define print_err(fmt, ...) printf("%s:[err] " fmt "\n", __FUNCTION__, __VA_ARGS__)
84 extern struct xran_mlog_times mlog_times;
86 #endif /* _APP_PROFILE_XRAN_ */