Skip to content
Permalink
Browse files

cleanup: include/: move misc/gcov.h to debug/gcov.h

move misc/gcov.h to debug/gcov.h and
create a shim for backward-compatibility.

No functional changes to the headers.
A warning in the shim can be controlled with CONFIG_COMPAT_INCLUDES.

Related to #16539

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
  • Loading branch information...
nashif committed Jun 26, 2019
1 parent a2fd7d7 commit fa1c60014bfb3209602ce0511f3adf996adcae7c
Showing with 26 additions and 11 deletions.
  1. +19 −0 include/debug/gcov.h
  2. +6 −10 include/misc/gcov.h
  3. +1 −1 kernel/init.c
@@ -0,0 +1,19 @@
/*
* Copyright (c) 2018 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/

#ifndef ZEPHYR_INCLUDE_DEBUG_GCOV_H_
#define ZEPHYR_INCLUDE_DEBUG_GCOV_H_

#ifdef CONFIG_COVERAGE_GCOV
void gcov_coverage_dump(void);
void gcov_static_init(void);
#else
void gcov_coverage_dump(void) { }
void gcov_static_init(void) { }

#endif /* CONFIG_COVERAGE */

#endif /* ZEPHYR_INCLUDE_DEBUG_GCOV_H_ */
@@ -1,19 +1,15 @@
/*
* Copyright (c) 2018 Intel Corporation
* Copyright (c) 2019 Intel Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/

#ifndef ZEPHYR_INCLUDE_MISC_GCOV_H_
#define ZEPHYR_INCLUDE_MISC_GCOV_H_

#ifdef CONFIG_COVERAGE_GCOV
void gcov_coverage_dump(void);
void gcov_static_init(void);
#else
void gcov_coverage_dump(void) { }
void gcov_static_init(void) { }
#ifndef CONFIG_COMPAT_INCLUDES
#warning "This header file has moved, include <debug/gcov.h> instead."
#endif

#endif /* CONFIG_COVERAGE */
#include <debug/gcov.h>

#endif /* ZEPHYR_INCLUDE_MISC_GCOV_H_ */
#endif /* ZEPHYR_INCLUDE_MISC_GCOV_H_ */
@@ -33,7 +33,7 @@
#include <logging/log_ctrl.h>
#include <debug/tracing.h>
#include <stdbool.h>
#include <misc/gcov.h>
#include <debug/gcov.h>

#define IDLE_THREAD_NAME "idle"
#define LOG_LEVEL CONFIG_KERNEL_LOG_LEVEL

0 comments on commit fa1c600

Please sign in to comment.
You can’t perform that action at this time.