Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aubuf: fix build with re_trace_event #1019

Merged
merged 2 commits into from
Nov 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading