]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: trace: make trace sources read_mostly
authorWilly Tarreau <w@1wt.eu>
Sat, 10 Apr 2021 17:29:26 +0000 (19:29 +0200)
committerWilly Tarreau <w@1wt.eu>
Sat, 10 Apr 2021 17:29:26 +0000 (19:29 +0200)
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.

src/mux_fcgi.c
src/mux_h1.c
src/mux_h2.c
src/mux_pt.c

index ddb2a60d6bc971695a41ef2ec784563003caf3fd..f938a570e7b565a99ce191d41b01789f5057e579 100644 (file)
@@ -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
index 5b23a298a0e9d56f0e7c179dc903347fb11a96a2..aa885b8aadaa3092d2c2ebb61b2591e820670c3a 100644 (file)
@@ -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
index a42d573b0900674bce858ddc642b93439ee526fc..7d2c64e388589c6fb6463802f6ddb93a7a9076b8 100644 (file)
@@ -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
index 3a36f373edb97d9cd9c8dce78691e89b44333c54..86b86e28abcf4dd87bc6867c2bf412041ee95616 100644 (file)
@@ -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