Skip to content

Commit

Permalink
aubuf: fix build with re_trace_event (#1019)
Browse files Browse the repository at this point in the history
* aubuf: fix build with re_trace_event

* ajb: replace DEBUG_LEVEL by RE_AUBUF_TRACE
  • Loading branch information
cspiel1 authored Nov 28, 2023
1 parent cc44939 commit cbcabbc
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions rem/aubuf/ajb.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ struct ajb {
uint64_t ts0; /**< reference timestamp */
uint64_t tr0; /**< reference time of arrival */
uint64_t tr00; /**< arrival of first packet */
#if DEBUG_LEVEL >= 6
#ifdef RE_AUBUF_TRACE
struct {
int32_t d;
uint32_t buftime;
Expand Down Expand Up @@ -189,7 +189,7 @@ static void destructor(void *arg)
}


#if DEBUG_LEVEL >= 6
#ifdef RE_AUBUF_TRACE
static void plot_ajb(struct ajb *ajb, uint64_t tr)
{
uint32_t treal;
Expand All @@ -210,13 +210,13 @@ static void plot_ajb(struct ajb *ajb, uint64_t tr)
ajb->plot.bufmin, /* row 8 - plot */
ajb->plot.bufmax, /* row 9 - plot */
ajb->plot.as); /* row 10 - plot */
re_trace_event("ajb", "plot", 'P', NULL, 0, RE_TRACE_ARG_STRING_COPY,
re_trace_event("ajb", "plot", 'P', NULL, RE_TRACE_ARG_STRING_COPY,
"line", ajb->buf);
}
#endif


#if DEBUG_LEVEL >= 6
#ifdef RE_AUBUF_TRACE
void plot_underrun(struct ajb *ajb)
{
uint64_t tr;
Expand All @@ -234,7 +234,7 @@ void plot_underrun(struct ajb *ajb)
ajb, /* row 2 - grep optional */
treal, /* row 3 - plot optional */
1); /* row 4 - plot */
re_trace_event("ajb", "plot", 'U', NULL, 0, RE_TRACE_ARG_STRING_COPY,
re_trace_event("ajb", "plot", 'U', NULL, RE_TRACE_ARG_STRING_COPY,
"line", ajb->buf);
}
#else
Expand Down Expand Up @@ -375,7 +375,7 @@ void ajb_calc(struct ajb *ajb, const struct auframe *af, size_t cur_sz)
else
ajb->as = AJB_GOOD;

#if DEBUG_LEVEL >= 6
#ifdef RE_AUBUF_TRACE
ajb->plot.d = d;
ajb->plot.buftime = buftime;
ajb->plot.bufmin = bufmin;
Expand Down Expand Up @@ -438,7 +438,7 @@ enum ajb_state ajb_get(struct ajb *ajb, struct auframe *af)
/* early adjustment of avbuftime */
ajb->avbuftime -= ptime;
ajb->as = AJB_GOOD;
#if DEBUG_LEVEL >= 6
#ifdef RE_AUBUF_TRACE
ajb->plot.as = AJB_HIGH;
plot_ajb(ajb, tmr_jiffies());
ajb->plot.as = AJB_GOOD;
Expand All @@ -448,7 +448,7 @@ enum ajb_state ajb_get(struct ajb *ajb, struct auframe *af)
/* early adjustment */
ajb->avbuftime += ptime;
ajb->as = AJB_GOOD;
#if DEBUG_LEVEL >= 6
#ifdef RE_AUBUF_TRACE
ajb->plot.as = AJB_LOW;
plot_ajb(ajb, tmr_jiffies());
ajb->plot.as = AJB_GOOD;
Expand Down

0 comments on commit cbcabbc

Please sign in to comment.