mirror of https://github.com/thesofproject/sof.git
trace: remove trace_value
Because those functions was hardly used in source code. Moreover it is better practise to add short trace description, at least variable name instead of trace with only variable value. Signed-off-by: Karol Trzcinski <karolx.trzcinski@linux.intel.com>
This commit is contained in:
parent
5e6ceb0829
commit
edc81c521f
|
@ -544,7 +544,7 @@ static int test_keyword_get_config(struct comp_dev *dev,
|
|||
|
||||
/* Copy back to user space */
|
||||
bs = cd->config.size;
|
||||
trace_value(bs);
|
||||
trace_keyword_with_ids(dev, "value of block size: %u", bs);
|
||||
|
||||
if (bs == 0 || bs > size)
|
||||
return -EINVAL;
|
||||
|
|
|
@ -579,7 +579,7 @@ static int iir_cmd_get_data(struct comp_dev *dev,
|
|||
/* Copy back to user space */
|
||||
if (cd->config) {
|
||||
bs = cd->config->size;
|
||||
trace_value(bs);
|
||||
trace_eq_with_ids(dev, "value of block size: %u", bs);
|
||||
if (bs > SOF_EQ_IIR_MAX_SIZE || bs == 0 ||
|
||||
bs > max_size)
|
||||
return -EINVAL;
|
||||
|
|
|
@ -32,9 +32,6 @@
|
|||
#define tracev_pm(__e, ...) \
|
||||
tracev_event(TRACE_CLASS_POWER, __e, ##__VA_ARGS__)
|
||||
|
||||
/** \brief Power management trace value function. */
|
||||
#define tracev_pm_value(__e) tracev_value(__e)
|
||||
|
||||
/* PM runtime flags */
|
||||
|
||||
#define RPM_ASYNC 0x01 /**< Request is asynchronous */
|
||||
|
|
|
@ -76,7 +76,6 @@
|
|||
#define trace_lock(__e) trace_error_atomic(TRACE_CLASS_LOCK, __e)
|
||||
#define tracev_lock(__e) tracev_event_atomic(TRACE_CLASS_LOCK, __e)
|
||||
#define trace_lock_error(__e) trace_error_atomic(TRACE_CLASS_LOCK, __e)
|
||||
#define trace_lock_value(__e) trace_error_value_atomic(__e)
|
||||
|
||||
extern uint32_t lock_dbg_atomic;
|
||||
extern uint32_t lock_dbg_user[DBG_LOCK_USERS];
|
||||
|
|
|
@ -220,9 +220,6 @@ void trace_init(struct sof *sof);
|
|||
_log_message(__mbox, _atomic, LOG_LEVEL_VERBOSE, class, id_0, id_1, \
|
||||
has_ids, format, ##__VA_ARGS__)
|
||||
|
||||
#define trace_value(x) trace_event(0, "value %u", x)
|
||||
#define trace_value_atomic(x) trace_event_atomic(0, "value %u", x)
|
||||
|
||||
#define trace_point(x) platform_trace_point(x)
|
||||
|
||||
/* verbose tracing */
|
||||
|
@ -234,8 +231,6 @@ void trace_init(struct sof *sof);
|
|||
|
||||
#define tracev_event_comp(...) _trace_comp_build(tracev_event_with_ids, \
|
||||
##__VA_ARGS__)
|
||||
#define tracev_value(x) trace_value(x)
|
||||
#define tracev_value_atomic(x) trace_value_atomic(x)
|
||||
#else
|
||||
#define tracev_event(...) do {} while (0)
|
||||
#define tracev_event_with_ids(...) do {} while (0)
|
||||
|
@ -243,8 +238,6 @@ void trace_init(struct sof *sof);
|
|||
#define tracev_event_atomic_with_ids(...) do {} while (0)
|
||||
|
||||
#define tracev_event_comp(...) do {} while (0)
|
||||
#define tracev_value(x) do {} while (0)
|
||||
#define tracev_value_atomic(x) do {} while (0)
|
||||
#endif
|
||||
|
||||
/* error tracing */
|
||||
|
@ -260,9 +253,6 @@ void trace_init(struct sof *sof);
|
|||
#define trace_error_atomic_with_ids(...) trace_error_with_ids(__VA_ARGS__)
|
||||
#define trace_error_comp(...) _trace_comp_build(trace_error_with_ids, \
|
||||
##__VA_ARGS__)
|
||||
/* write back error value to mbox */
|
||||
#define trace_error_value(x) trace_error(0, "value %u", x)
|
||||
#define trace_error_value_atomic(...) trace_error_value(__VA_ARGS__)
|
||||
#else
|
||||
#define trace_error(...) trace_event(__VA_ARGS__)
|
||||
#define trace_error_with_ids(...) trace_event_with_ids(__VA_ARGS__)
|
||||
|
@ -270,9 +260,6 @@ void trace_init(struct sof *sof);
|
|||
#define trace_error_atomic_with_ids(...) trace_event_atomic_with_ids(__VA_ARGS__)
|
||||
#define trace_error_comp(...) _trace_comp_build(trace_error_with_ids, \
|
||||
##__VA_ARGS__)
|
||||
#define trace_error_value(x) trace_value(x)
|
||||
#define trace_error_value_atomic(x) trace_value_atomic(x)
|
||||
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_LIBRARY
|
||||
|
@ -366,20 +353,12 @@ do { \
|
|||
#define trace_error_atomic(...) do {} while (0)
|
||||
#define trace_error_atomic_with_ids(...) do {} while (0)
|
||||
|
||||
#define trace_error_value(x) do {} while (0)
|
||||
#define trace_error_value_atomic(x) do {} while (0)
|
||||
|
||||
#define trace_value(x) do {} while (0)
|
||||
#define trace_value_atomic(x) do {} while (0)
|
||||
|
||||
#define trace_point(x) do {} while (0)
|
||||
|
||||
#define tracev_event(...) do {} while (0)
|
||||
#define tracev_event_with_ids(...) do {} while (0)
|
||||
#define tracev_event_atomic(...) do {} while (0)
|
||||
#define tracev_event_atomic_with_ids(...) do {} while (0)
|
||||
#define tracev_value(x) do {} while (0)
|
||||
#define tracev_value_atomic(x) do {} while (0)
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -31,8 +31,6 @@
|
|||
|
||||
#define trace_sa(__e, ...) \
|
||||
trace_event_atomic(TRACE_CLASS_SA, __e, ##__VA_ARGS__)
|
||||
#define trace_sa_value(__e, ...) \
|
||||
trace_value_atomic(__e, ##__VA_ARGS__)
|
||||
#define trace_sa_error(__e, ...) \
|
||||
trace_error(TRACE_CLASS_SA, __e, ##__VA_ARGS__)
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include <user/trace.h>
|
||||
#include <errno.h>
|
||||
#include <stdint.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#define DEFAULT_TRY_TIMES 8
|
||||
|
||||
|
@ -41,8 +42,8 @@ int wait_for_completion_timeout(completion_t *comp)
|
|||
}
|
||||
|
||||
/* timeout */
|
||||
trace_error_value(c->timeout);
|
||||
trace_error_value(c->complete);
|
||||
trace_error(TRACE_CLASS_WAIT, "wait_for_completion_timeout, timeout: "
|
||||
PRIu64 " complete: %d", c->timeout, c->complete);
|
||||
|
||||
return -ETIME;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue