Skip to content
This repository was archived by the owner on Jan 17, 2019. It is now read-only.

Commit e37aa3f

Browse files
authored
Merge pull request #88 from akloniex/unify-logger
logger/rmbox: unify implementation of new logger tool with old rmbox
2 parents 2d7a933 + 86b8daf commit e37aa3f

11 files changed

Lines changed: 766 additions & 622 deletions

File tree

Makefile.am

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
SUBDIRS = logger rmbox topology eqctl
1+
SUBDIRS = rmbox topology eqctl
22
TESTDIR = topology/test
33

44
tests:

configure.ac

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ AC_PROG_CC
1818

1919
AC_OUTPUT([
2020
Makefile
21-
logger/Makefile
2221
rmbox/Makefile
2322
eqctl/Makefile
2423
topology/Makefile

logger/Makefile.am

Lines changed: 0 additions & 4 deletions
This file was deleted.

logger/logger.c

Lines changed: 0 additions & 316 deletions
This file was deleted.

rmbox/Makefile.am

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
1-
bin_PROGRAMS = rmbox
1+
bin_PROGRAMS = rmbox logger
22

33
rmbox_SOURCES = \
4-
rmbox.c
4+
rmbox.c \
5+
rmbox_convert.c
6+
7+
logger_SOURCES = \
8+
rmbox.c \
9+
logger_convert.c
10+
11+
logger_CFLAGS = \
12+
-DLOGGER_FORMAT

rmbox/convert.h

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/*
2+
* debug log converter interface.
3+
*
4+
* Copyright (c) 2018, Intel Corporation.
5+
*
6+
* This program is free software; you can redistribute it and/or modify it
7+
* under the terms and conditions of the GNU General Public License,
8+
* version 2, as published by the Free Software Foundation.
9+
*
10+
* This program is distributed in the hope it will be useful, but WITHOUT
11+
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12+
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
13+
* more details.
14+
*/
15+
#include <stdio.h>
16+
#include <sof/uapi/logging.h>
17+
18+
#define KNRM "\x1B[0m"
19+
#define KRED "\x1B[31m"
20+
21+
static double to_usecs(uint64_t time, double clk)
22+
{
23+
/* trace timestamp uses CPU system clock at default 25MHz ticks */
24+
// TODO: support variable clock rates
25+
return (double)time / clk;
26+
}
27+
28+
struct convert_config {
29+
const char *out_file;
30+
const char *in_file;
31+
FILE *out_fd;
32+
FILE *in_fd;
33+
double clock;
34+
int trace;
35+
#ifdef LOGGER_FORMAT
36+
const char *ldc_file;
37+
FILE* ldc_fd;
38+
#endif
39+
};
40+
41+
int convert(struct convert_config *config);

0 commit comments

Comments
 (0)