From: Willy Tarreau Date: Sat, 10 Apr 2021 17:29:26 +0000 (+0200) Subject: MINOR: trace: make trace sources read_mostly X-Git-Tag: v2.4-dev17~150 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6eb3d37bf45844789a7118d259ea14dc0b398a51;p=thirdparty%2Fhaproxy.git MINOR: trace: make trace sources read_mostly The trace sources are checked at plenty of places in the code and their contents only change when trace status changes, let's mark them read_mostly. --- diff --git a/src/mux_fcgi.c b/src/mux_fcgi.c index ddb2a60d6b..f938a570e7 100644 --- a/src/mux_fcgi.c +++ b/src/mux_fcgi.c @@ -335,7 +335,7 @@ static const struct name_desc fcgi_trace_decoding[] = { { /* end */ } }; -static struct trace_source trace_fcgi = { +static struct trace_source trace_fcgi __read_mostly = { .name = IST("fcgi"), .desc = "FastCGI multiplexer", .arg_def = TRC_ARG1_CONN, // TRACE()'s first argument is always a connection diff --git a/src/mux_h1.c b/src/mux_h1.c index 5b23a298a0..aa885b8aad 100644 --- a/src/mux_h1.c +++ b/src/mux_h1.c @@ -244,7 +244,7 @@ static const struct name_desc h1_trace_decoding[] = { { /* end */ } }; -static struct trace_source trace_h1 = { +static struct trace_source trace_h1 __read_mostly = { .name = IST("h1"), .desc = "HTTP/1 multiplexer", .arg_def = TRC_ARG1_CONN, // TRACE()'s first argument is always a connection diff --git a/src/mux_h2.c b/src/mux_h2.c index a42d573b09..7d2c64e388 100644 --- a/src/mux_h2.c +++ b/src/mux_h2.c @@ -372,7 +372,7 @@ static const struct name_desc h2_trace_decoding[] = { { /* end */ } }; -static struct trace_source trace_h2 = { +static struct trace_source trace_h2 __read_mostly = { .name = IST("h2"), .desc = "HTTP/2 multiplexer", .arg_def = TRC_ARG1_CONN, // TRACE()'s first argument is always a connection diff --git a/src/mux_pt.c b/src/mux_pt.c index 3a36f373ed..86b86e28ab 100644 --- a/src/mux_pt.c +++ b/src/mux_pt.c @@ -76,7 +76,7 @@ static const struct name_desc pt_trace_decoding[] = { { /* end */ } }; -static struct trace_source trace_pt = { +static struct trace_source trace_pt __read_mostly = { .name = IST("pt"), .desc = "Passthrough multiplexer", .arg_def = TRC_ARG1_CONN, // TRACE()'s first argument is always a connection