Skip to content

trace-cmd: Simplify the msg handling

Steven Rostedt linux-trace-devel 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest38 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/38trace-cmd recorder: Check if pipe_size was modified by fcntl(F_GETPIPE_SZ)trace-recorder.c+4 -30 replies
2/38pevent: Simplify pointer print logic and fix %pFevent-parse.c+9 -80 replies
3/38pevent: Handle new pointer processing of bprint stringsevent-parse.c+26 -00 replies
4/38trace-cmd record: Fix clearing out the ctx->instance when used in for_all_instances()trace-record.c+30 -260 replies
5/38trace-cmd: Remove the creating of msg out of tracecmd_msg_send()trace-msg.c+37 -190 replies
6/38trace-cmd: Move tracecmd_msg_send_and_wait_for_msg() into its only usertrace-msg.c+9 -210 replies
7/38trace-cmd: Turn tracecmd_msg data into an anonymous uniontrace-msg.c+38 -380 replies
8/38trace-cmd: Remove unused structure tracecmd_msg_errortrace-msg.c+0 -110 replies
9/38trace-cmd: Move size and cmd in tracecmd_msg into its own header structtrace-msg.c+33 -300 replies
10/38trace-cmd: Move the tracecmd_msg pointers into their own uniontrace-msg.c+34 -290 replies
11/38trace-cmd: Just use the buf field for sending pointerstrace-msg.c+5 -50 replies
12/38trace-cmd: Use an array to map msg types and min sizestrace-msg.c+32 -210 replies
13/38trace-cmd: Merge msg_do_write_check() into msg_write()trace-msg.c+10 -190 replies
14/38trace-cmd: Simplify msg_free() by using min sizestrace-msg.c+4 -100 replies
15/38trace-cmd: Add tracecmd_msg_init() helper functiontrace-msg.c+8 -40 replies
16/38trace-cmd: Remove mulitplexer tracecmd_msg_create()trace-msg.c+7 -390 replies
17/38trace-cmd: Simplify msg_read_extra()trace-msg.c+21 -460 replies
18/38trace-cmd: Have msg_free() zero out msg contentstrace-msg.c+2 -00 replies
19/38trace-cmd: Verify RINIT was received after TINIT msg senttrace-msg.c+3 -00 replies
20/38trace-cmd: Make send_metadata a flag in the output handletrace-cmd.h trace-msg.c trace-msg.h +2 more+17 -130 replies
21/38trace-cmd: Pass cpu count and port array to make_rinit()trace-msg.c+7 -110 replies
22/38trace-cmd: Pass cpu_count instead of having it as a globaltrace-cmd.h trace-msg.c trace-msg.h +1 more+7 -80 replies
23/38trace-cmd: Pass in client_ports instead of using a global variabletrace-cmd.h trace-msg.c trace-msg.h +1 more+11 -70 replies
24/38trace-cmd msg: Add debug prints of messages sent and receivedtrace-msg.c+30 -00 replies
25/38trace-cmd msg: Move the saved closing fd to the callertrace-cmd.h trace-msg.c trace-record.c+8 -90 replies
26/38trace-cmd listen: Add better output on error of connectionstrace-listen.c+4 -20 replies
27/38trace-cmd msg: Create a msg_handle to pass around for saved statetrace-cmd.h trace-listen.c trace-msg.c +2 more+174 -830 replies
28/38trace-cmd msg: Add server structure of msg_handlertrace-cmd.h trace-listen.c trace-msg.c +1 more+48 -91 reply
29/38trace-cmd: Remove global use_tcp variabletrace-cmd.h trace-listen.c trace-msg.c +2 more+29 -260 replies
30/38trace-cmd: Move protocol version into msg_handlertrace-cmd.h trace-listen.c trace-record.c+21 -170 replies
31/38tracecmd: Clean up handling of cpu_counttrace-cmd.h trace-listen.c trace-msg.c+29 -190 replies
32/38tracecmd listen: Have pagesize passed as return not parametertrace-cmd.h trace-listen.c trace-msg.c+20 -180 replies
33/38trace-cmd: Have cpu_count reside in instances and not be globaltrace-cmd.h trace-local.h trace-msg.c +2 more+73 -580 replies
34/38trace-cmd: Add option CPUCOUNT to buffer instance optionstrace-cmd.h trace-input.c trace-output.c +1 more+80 -160 replies
35/38trace-cmd: Have msg_handle part of the buffer instancetrace-local.h trace-record.c+35 -230 replies
36/38trace-cmd record: Allow instances to be recorded over the networktrace-record.c+11 -50 replies
37/38trace-cmd: Have keep and profile be flags of buffer instancetrace-local.h trace-record.c+22 -160 replies
38/38trace-cmd: Add network handle into buffer instancetrace-local.h trace-record.c+8 -40 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/38] trace-cmd: Simplify the msg handling

The msg handling of trace-cmd for the listen and record code is overly complex due to the multiplexing functions. Rewrite the code such that it is easier to understand. This will allow us to extend it in the future for the virt-server work.

-- Steve

git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/trace-cmd.git
trace-cmd

Head SHA1: 9420ffed51b5a1a28c175efc41fdd49507acda89

Steven Rostedt (Red Hat) (34):
trace-cmd: Remove the creating of msg out of tracecmd_msg_send()
trace-cmd: Move tracecmd_msg_send_and_wait_for_msg() into its only user
trace-cmd: Turn tracecmd_msg data into an anonymous union
trace-cmd: Remove unused structure tracecmd_msg_error
trace-cmd: Move size and cmd in tracecmd_msg into its own header struct
trace-cmd: Move the tracecmd_msg pointers into their own union
trace-cmd: Just use the buf field for sending pointers
trace-cmd: Use an array to map msg types and min sizes
trace-cmd: Merge msg_do_write_check() into msg_write()
trace-cmd: Simplify msg_free() by using min sizes
trace-cmd: Add tracecmd_msg_init() helper function
trace-cmd: Remove mulitplexer tracecmd_msg_create()
trace-cmd: Simplify msg_read_extra()
trace-cmd: Have msg_free() zero out msg contents
trace-cmd: Verify RINIT was received after TINIT msg sent
trace-cmd: Make send_metadata a flag in the output handle
trace-cmd: Pass cpu count and port array to make_rinit()
trace-cmd: Pass cpu_count instead of having it as a global
trace-cmd: Pass in client_ports instead of using a global variable trace-cmd msg: Add debug prints of messages sent and received trace-cmd msg: Move the saved closing fd to the caller trace-cmd listen: Add better output on error of connections trace-cmd msg: Create a msg_handle to pass around for saved state trace-cmd msg: Add server structure of msg_handler
trace-cmd: Remove global use_tcp variable
trace-cmd: Move protocol version into msg_handler
tracecmd: Clean up handling of cpu_count
tracecmd listen: Have pagesize passed as return not parameter
trace-cmd: Have cpu_count reside in instances and not be global
trace-cmd: Add option CPUCOUNT to buffer instance options
trace-cmd: Have msg_handle part of the buffer instance trace-cmd record: Allow instances to be recorded over the network
trace-cmd: Have keep and profile be flags of buffer instance
trace-cmd: Add network handle into buffer instance

Steven Rostedt (VMware) (4):
trace-cmd recorder: Check if pipe_size was modified by fcntl(F_GETPIPE_SZ)
pevent: Simplify pointer print logic and fix %pF
pevent: Handle new pointer processing of bprint strings
trace-cmd record: Fix clearing out the ctx->instance when used in for_all_instances()

----

 event-parse.c    |  43 ++++-
 trace-cmd.h      |  52 +++++-
 trace-input.c    |  27 ++++
 trace-listen.c   | 138 +++++++++++-----
 trace-local.h    |  15 +-
 trace-msg.c      | 486 ++++++++++++++++++++++++++++---------------------------
 trace-msg.h      |  10 --
 trace-output.c   |  38 ++++-
 trace-record.c   | 391 +++++++++++++++++++++++++++-----------------
 trace-recorder.c |   7 +-
 trace-stat.c     |   2 +-
 11 files changed, 741 insertions(+), 468 deletions(-)