-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tracing: automake-ify tracepoint generation
Signed-off-by: Noah Watkins <[email protected]>
- Loading branch information
Showing
14 changed files
with
46 additions
and
221 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*.h | ||
*.c |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,22 @@ | ||
%.c %.h: %.tp | ||
$(LTTNG_GEN_TP_PROG) $< | ||
rm -f $<.o | ||
|
||
dist_noinst_DATA = mutex.tp osd.tp pg.tp | ||
|
||
libtracepoints_la_SOURCES = \ | ||
mutex.tp.c \ | ||
mutex.tp.h \ | ||
osd.tp.c \ | ||
osd.tp.h \ | ||
pg.tp.h \ | ||
pg.tp.c | ||
mutex.c \ | ||
mutex.h \ | ||
osd.c \ | ||
osd.h \ | ||
pg.h \ | ||
pg.c | ||
|
||
libtracepoints_la_LIBADD = -llttng-ust -ldl | ||
libtracepoints_la_CPPFLAGS = -DTRACEPOINT_PROBE_DYNAMIC_LINKAGE | ||
libtracepoints_la_LDFLAGS = | ||
noinst_LTLIBRARIES = libtracepoints.la | ||
|
||
BUILT_SOURCES = mutex.h osd.h pg.h | ||
|
||
CLEANFILES = $(libtracepoints_la_SOURCES) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,24 @@ | ||
Add New Provider | ||
================ | ||
|
||
## Create tracepoint definition file | ||
|
||
Add tracepoint definitions for the provider into a `.tp` file. Documentation | ||
on defining a tracepoint can be found in `man lttng-ust`. By convention files | ||
are named according to the logical sub-system they correspond to (e.g. | ||
`mutex.tp`, `pg.tp`). | ||
Installation | ||
============ | ||
|
||
## Generate tracepoint source files | ||
The LTTng libraries that ship with Ubuntu 12.04 have been very buggy, and the | ||
generated header files using `lttng-gen-tp` have needed to be fixed just to | ||
compile in the Ceph tree. The packages available in Ubuntu 14.04 seem to work | ||
alright, and for older versions please install LTTng from the LTTng PPA. | ||
|
||
The `.tp` file is converted into source files using the `lttng-gen-tp` tool. | ||
https://launchpad.net/~lttng/+archive/ppa | ||
|
||
lttng-gen-tp mutex.tp -o mutex.tp.h -o mutex.tp.c | ||
Then install as normal | ||
|
||
## Add source files to libtracepoints.la | ||
apt-get install lttng-tools liblttng-ust-dev | ||
|
||
Modify Makefile.am to include the generated source files from the previous | ||
step. | ||
|
||
## Commit changes to Git | ||
|
||
Commit both the source `.tp` file as well as the generated sources, and the | ||
changes to Makefile.am. | ||
Add/Update Provider | ||
================ | ||
|
||
Add Tracepoint to Existing Provider | ||
=================================== | ||
## Create tracepoint definition file | ||
|
||
New tracepoints can be added to an existing provider by updating the | ||
corresponding `.tp` file and re-generating the source files. Make sure to | ||
commit the updated files back into Git. | ||
Add tracepoint definitions for the provider into a `.tp` file. Documentation | ||
on defining a tracepoint can be found in `man lttng-ust`. By convention files | ||
are named according to the logical sub-system they correspond to (e.g. | ||
`mutex.tp`, `pg.tp`). Place the `.tp` file into the `src/tracing` directory | ||
and modify the automake file `src/tracing/Makefile.am` accordingly. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.