-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
38 changed files
with
2,190 additions
and
40 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
ACLOCAL_AMFLAGS = -I m4 | ||
SUBDIRS = utils opencl ze xprof cuda omp hip | ||
SUBDIRS = utils sampling opencl ze xprof cuda omp hip | ||
|
||
EXTRA_DIST = autogen.sh README.md |
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
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
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,59 @@ | ||
if STRICT | ||
WERROR = -Werror | ||
else | ||
WERROR = | ||
endif | ||
LTTNG_FLAGS = -fPIC -Wall -Wextra -Wno-unused-parameter -Wno-type-limits -Wno-sign-compare $(WERROR) -I$(top_srcdir)/utils -I$(top_srcdir)/utils/include -I$(srcdir)/include -I../utils -I./ | ||
|
||
|
||
TRACEPOINT_GEN = \ | ||
$(srcdir)/sampling_events.yaml | ||
|
||
SAMPLING_STATIC_PROBES = \ | ||
sampling | ||
|
||
SAMPLING_STATIC_PROBES_TP = $(SAMPLING_STATIC_PROBES:=.tp) | ||
|
||
SAMPLING_STATIC_PROBES_INCL = $(SAMPLING_STATIC_PROBES:=.h) | ||
|
||
SAMPLING_STATIC_PROBES_SRC = $(SAMPLING_STATIC_PROBES:=.c) | ||
|
||
$(SAMPLING_STATIC_PROBES_TP): %.tp: $(srcdir)/gen_sampling_custom_probes.rb $(TRACEPOINT_GEN) | ||
SRC_DIR=$(srcdir) $(RUBY) $< lttng_ust_$* > $@ | ||
|
||
%.h %.c: %.tp | ||
$(LTTNG_GEN_TP) $< -o $*.c -o $*.h | ||
|
||
noinst_LTLIBRARIES = libtracepoints.la | ||
|
||
nodist_libtracepoints_la_SOURCES = \ | ||
$(SAMPLING_STATIC_PROBES_INCL) \ | ||
$(SAMPLING_STATIC_PROBES_SRC) | ||
|
||
libtracepoints_la_CFLAGS = $(LTTNG_FLAGS) $(LTTNG_UST_CFLAGS) | ||
libtracepoints_la_LDFLAGS = $(LTTNG_UST_LIBS) | ||
|
||
EXTRA_DIST = \ | ||
sampling_events.yaml \ | ||
gen_sampling_custom_probes.rb | ||
|
||
CLEANFILES = \ | ||
$(SAMPLING_STATIC_PROBES_INCL) \ | ||
$(SAMPLING_STATIC_PROBES_TP) \ | ||
$(SAMPLING_STATIC_PROBES_SRC) | ||
|
||
BUILT_SOURCES = \ | ||
$(SAMPLING_STATIC_PROBES_INCL) | ||
|
||
nodist_libThapiSampling_la_SOURCES = \ | ||
$(SAMPLING_STATIC_PROBES_INCL) | ||
|
||
libThapiSampling_la_SOURCES = \ | ||
thapi_sampling.h \ | ||
thapi_sampling.c | ||
|
||
libThapiSampling_la_CFLAGS = -Wall -Wextra -Wno-unused-parameter $(WERROR) -I$(top_srcdir)/utils/include | ||
libThapiSampling_la_LDFLAGS = -lpthread -version-info 1:0:0 | ||
libThapiSampling_la_LIBADD = libtracepoints.la | ||
|
||
lib_LTLIBRARIES = libThapiSampling.la |
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,32 @@ | ||
require 'yaml' | ||
require_relative '../utils/LTTng' | ||
|
||
if ENV["SRC_DIR"] | ||
SRC_DIR = ENV["SRC_DIR"] | ||
else | ||
SRC_DIR = "." | ||
end | ||
|
||
namespace = ARGV[0] | ||
|
||
raise "No namespace provided!" unless namespace | ||
|
||
h = YAML::load_file(File.join(SRC_DIR,"sampling_events.yaml"))[namespace] | ||
|
||
raise "Invalid namespace!" unless h | ||
|
||
puts <<EOF | ||
#include "lttng/tracepoint_gen.h" | ||
EOF | ||
enums = h["enums"] | ||
|
||
if enums | ||
enums.each { |e| | ||
LTTng.print_enum(namespace, e) | ||
} | ||
end | ||
|
||
h["events"].each { |e| | ||
LTTng.print_tracepoint(namespace, e) | ||
} |
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,11 @@ | ||
--- | ||
lttng_ust_sampling: | ||
events: | ||
- name: heartbeat | ||
args: | ||
- [uint64_t, foo] | ||
fields: | ||
- [ctf_integer, uint64_t, foo, foo] | ||
- name: heartbeat2 | ||
args: [] | ||
fields: [] |
Oops, something went wrong.