Skip to content

Commit

Permalink
Trace: remove uid usage in trace
Browse files Browse the repository at this point in the history
This is part of remove ipc3 logging context dependency.

Signed-off-by: Baofeng Tian <baofeng.tian@intel.com>
  • Loading branch information
btian1 committed Jan 29, 2024
1 parent ec719a7 commit e578ff7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
1 change: 0 additions & 1 deletion src/include/user/trace.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@
* Number of arguments is specified by the params_num field of log_entry
*/
struct log_entry_header {
uint32_t uid;
uint32_t id_0 : TRACE_ID_LENGTH; /* e.g. Pipeline ID */
uint32_t id_1 : TRACE_ID_LENGTH; /* e.g. Component ID */
uint32_t core_id : 8; /* Reporting core's id */
Expand Down
7 changes: 3 additions & 4 deletions src/trace/trace.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ struct trace {

#define TRACE_ID_MASK ((1 << TRACE_ID_LENGTH) - 1)

static void put_header(void *dst, const struct sof_uuid_entry *uid,
static void put_header(void *dst,
uint32_t id_1, uint32_t id_2,
uint32_t entry, uint64_t timestamp)
{
Expand All @@ -82,7 +82,6 @@ static void put_header(void *dst, const struct sof_uuid_entry *uid,
struct log_entry_header header;
int ret;

header.uid = (uintptr_t)uid;
header.id_0 = id_1 & TRACE_ID_MASK;
header.id_1 = id_2 & TRACE_ID_MASK;
header.core_id = cpu_get_id();
Expand Down Expand Up @@ -231,7 +230,7 @@ static void dma_trace_log(bool send_atomic, uint32_t log_entry, const struct tr_
int i;

/* fill log content. arg_count is in the dictionary. */
put_header(data, ctx->uuid_p, id_1, id_2, log_entry, sof_cycle_get_64_safe());
put_header(data, id_1, id_2, log_entry, sof_cycle_get_64_safe());

for (i = 0; i < arg_count; ++i)
data[PAYLOAD_OFFSET(i)] = va_arg(vargs, uint32_t);
Expand Down Expand Up @@ -507,7 +506,7 @@ static void mtrace_dict_entry_vl(bool atomic_context, uint32_t dict_entry_addres
uint32_t *args = (uint32_t *)&packet[MESSAGE_SIZE(0)];
const uint64_t tstamp = sof_cycle_get_64_safe();

put_header(packet, dt_tr.uuid_p, _TRACE_INV_ID, _TRACE_INV_ID,
put_header(packet, _TRACE_INV_ID, _TRACE_INV_ID,
dict_entry_address, tstamp);

for (i = 0; i < MIN(n_args, _TRACE_EVENT_MAX_ARGUMENT_COUNT); i++)
Expand Down
4 changes: 2 additions & 2 deletions tools/logger/convert.c
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ static void print_entry_params(const struct log_entry_header *dma_log,
(LOG_LEVEL_CRITICAL ? KRED : KNRM) : "",
dma_log->core_id,
entry->header.level,
get_component_name(entry->header.component_class, dma_log->uid),
get_component_name(entry->header.component_class, 0),
raw_output && strlen(ids) ? "-" : "",
ids);

Expand Down Expand Up @@ -548,7 +548,7 @@ static void print_entry_params(const struct log_entry_header *dma_log,
/* component name and id */
fprintf(out_fd, "%s%-12s %-5s%s ",
use_colors ? KYEL : "",
get_component_name(entry->header.component_class, dma_log->uid),
get_component_name(entry->header.component_class, 0),
ids,
use_colors ? KNRM : "");

Expand Down

0 comments on commit e578ff7

Please sign in to comment.