Skip to content

Commit 2d2f96a

Browse files
shiqingglijinxia
authored andcommitted
hv: clean up function definitions in profiling.h
seperate the function definitions into debug/release directories to better distinguish debug/release libraries Tracked-On: #861 Signed-off-by: Shiqing Gao <shiqing.gao@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
1 parent 14f30a2 commit 2d2f96a

File tree

2 files changed

+12
-10
lines changed

2 files changed

+12
-10
lines changed

hypervisor/include/debug/profiling.h

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,20 +8,11 @@
88
#define PROFILING_H
99

1010
#ifdef PROFILING_ON
11-
1211
#include <profiling_internal.h>
12+
#endif
1313

1414
void profiling_vmenter_handler(struct acrn_vcpu *vcpu);
1515
void profiling_vmexit_handler(struct acrn_vcpu *vcpu, uint64_t exit_reason);
1616
void profiling_setup(void);
1717

18-
#else
19-
20-
static inline void profiling_vmenter_handler(__unused struct acrn_vcpu *vcpu) {}
21-
static inline void profiling_vmexit_handler(__unused struct acrn_vcpu *vcpu,
22-
__unused uint64_t exit_reason) {}
23-
static inline void profiling_setup(void) {}
24-
25-
#endif
26-
2718
#endif /* PROFILING_H */

hypervisor/release/profiling.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/*
2+
* Copyright (C) 2018 Intel Corporation. All rights reserved.
3+
*
4+
* SPDX-License-Identifier: BSD-3-Clause
5+
*/
6+
7+
#include <hypervisor.h>
8+
9+
void profiling_vmenter_handler(__unused struct acrn_vcpu *vcpu) {}
10+
void profiling_vmexit_handler(__unused struct acrn_vcpu *vcpu, __unused uint64_t exit_reason) {}
11+
void profiling_setup(void) {}

0 commit comments

Comments
 (0)