infra: lib_timing: remove dependency from MARS and BRICK

This commit is contained in:
Thomas Schoebel-Theuer 2015-08-05 15:56:40 +02:00
parent f069de7226
commit 1c7b01b271
2 changed files with 6 additions and 8 deletions

View File

@ -27,7 +27,7 @@
#include <linux/kernel.h>
#include <linux/module.h>
#ifdef CONFIG_MARS_DEBUG
#ifdef CONFIG_DEBUG_KERNEL
int report_timing(struct timing_stats *tim, char *str, int maxlen)
{
@ -62,7 +62,7 @@ int report_timing(struct timing_stats *tim, char *str, int maxlen)
}
EXPORT_SYMBOL_GPL(report_timing);
#endif
#endif // CONFIG_DEBUG_KERNEL
struct threshold global_io_threshold = {
.thr_limit = 30 * 1000000, // 30 seconds

View File

@ -24,8 +24,6 @@
#ifndef MARS_LIB_TIMING_H
#define MARS_LIB_TIMING_H
#include "brick.h"
#include <linux/sched.h>
/* Simple infrastructure for timing of arbitrary operations and creation
@ -35,7 +33,7 @@
#define TIMING_MAX 24
struct timing_stats {
#ifdef CONFIG_MARS_DEBUG
#ifdef CONFIG_DEBUG_KERNEL
int tim_count[TIMING_MAX];
#endif
};
@ -59,7 +57,7 @@ struct timing_stats {
})
#ifdef CONFIG_MARS_DEBUG
#ifdef CONFIG_DEBUG_KERNEL
#define _TIME_STATS(_timing, _stamp1, _stamp2, _CODE) \
({ \
@ -88,7 +86,7 @@ struct timing_stats {
extern int report_timing(struct timing_stats *tim, char *str, int maxlen);
#else // CONFIG_MARS_DEBUG
#else // CONFIG_DEBUG_KERNEL
#define _TIME_STATS(_timing, _stamp1, _stamp2, _CODE) \
((void)_timing, (_stamp1) = (_stamp2) = cpu_clock(raw_smp_processor_id()), _CODE, 0)
@ -98,7 +96,7 @@ extern int report_timing(struct timing_stats *tim, char *str, int maxlen);
#define report_timing(tim,str,maxlen) ((void)tim, 0)
#endif // CONFIG_MARS_DEBUG
#endif // CONFIG_DEBUG_KERNEL
/* A banning represents some overloaded resource.
*