Skip to content

Separate trace-cmd and libtracecmd code

Tzvetomir Stoyanov (VMware) linux-trace-devel 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest4 patches 0 repliesNew
  2. v28 patches 9 repliesSuperseded
  3. v17 patches 4 repliesSuperseded

Changes in v3 from the cover letter

- Removed accepted patches from the series.
- Added new patch: "Update descriptions of "debug" libtracecmd APIs".
- Renamed "plog*" library APIs to "tracecmd_plog*".
- Rmoved "tracecmd" prefix from local variables.
- Renamed trace_set_log_file to tracecmd_set_logfile.
- Changed tracecmd_set_quiet() and tracecmd_get_quiet() APIs to work per tracecmd_output handler.

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4trace-cmd: Move trace-cmd global variable "quiet" to libtracecmdinclude/trace-cmd/trace-cmd.h lib/trace-cmd/include/trace-cmd-local.h lib/trace-cmd/trace-output.c +3 more+40 -120 replies
2/4trace-cmd: Move plog() function to libtracecmd.include/trace-cmd/trace-cmd.h include/trace-cmd/trace-msg.h lib/trace-cmd/trace-msg.c +3 more+96 -800 replies
3/4trace-cmd: Move tracecmd_stack_tracer_status() function to libtracecmdlib/trace-cmd/trace-util.c tracecmd/trace-stack.c+53 -540 replies
4/4trace-cmd: Update descriptions of "debug" libtracecmd APIsinclude/trace-cmd/trace-cmd.h lib/trace-cmd/trace-util.c+10 -100 replies

Reviews trailers per patch

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

Read the v3 thread

Cover letter [PATCH v3 0/4] Separate trace-cmd and libtracecmd code

libtracecmd is a library, containing functions that can be used without the trace-cmd application. However, some of the functions declared as libtracecmd APIs in trace-cmd.h depend on trace-cmd context. That causes a problem when other application uses the library. The problem can be observed when running kerneshark and there is a python module, loaded by the python plugin - there is a bunch of warnings.
To resolve the problem, implementations of all trace-cmd independent functions are moved into libtracecmd. All libtracecmd functions, that depend on trace-cmd context are removed from the library and from trace-cmd.h file.

[
v3 changes:
- Removed accepted patches from the series.
- Added new patch: "Update descriptions of "debug" libtracecmd APIs".
- Renamed "plog*" library APIs to "tracecmd_plog*".
- Rmoved "tracecmd" prefix from local variables.
- Renamed trace_set_log_file to tracecmd_set_logfile.
- Changed tracecmd_set_quiet() and tracecmd_get_quiet() APIs to work per tracecmd_output handler.

v2 changes:
- Added a new patch:
Move trace-cmd-local.h from the application to the library.
- Remove trace-output.c dependency of version.h. Moved FILE_VERSION_STRING define from top Makefile to trace-cmd-local.h.
]

Tzvetomir Stoyanov (VMware) (4):
trace-cmd: Move trace-cmd global variable "quiet" to libtracecmd
trace-cmd: Move plog() function to libtracecmd.
trace-cmd: Move tracecmd_stack_tracer_status() function to libtracecmd
trace-cmd: Update descriptions of "debug" libtracecmd APIs

 include/trace-cmd/trace-cmd.h           |   9 +-
 include/trace-cmd/trace-msg.h           |   3 -
 lib/trace-cmd/include/trace-cmd-local.h |   2 -
 lib/trace-cmd/trace-msg.c               |   8 +-
 lib/trace-cmd/trace-output.c            |  28 ++++-
 lib/trace-cmd/trace-util.c              | 139 ++++++++++++++++++++++--
 tracecmd/include/trace-local.h          |   2 -
 tracecmd/trace-cmd.c                    |   2 -
 tracecmd/trace-listen.c                 |  89 +++------------
 tracecmd/trace-record.c                 |  17 ++-
 tracecmd/trace-stack.c                  |  56 +---------
 11 files changed, 199 insertions(+), 156 deletions(-)
Signature · 1 line
2.21.0