Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
HeteroFlow
THAPI
Commits
ce4058ca
Commit
ce4058ca
authored
Mar 17, 2021
by
Brice Videau
Browse files
Added basic tools to dump babeltrace2 trace format.
parent
4a37710b
Pipeline
#12961
canceled with stage
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
opencl/Makefile.am
View file @
ce4058ca
...
...
@@ -111,6 +111,9 @@ libTracerOpenCL_la_LDFLAGS += -Wl,--version-script,$(srcdir)/tracer_opencl.map -
libTracerOpenCL_la_DEPENDS
=
$(srcdir)
/tracer_opencl.map
libTracerOpenCL_la_LIBADD
=
libtracepoints.la
thapi_session
:
libTracerOpenCL.la
$(top_srcdir)
/utils/lttng_dummy_trace.sh ./.libs/libTracerOpenCL.so lttng_ust_opencl:
\*
,lttng_ust_opencl_build:
\*
,lttng_ust_opencl_arguments:
\*
,lttng_ust_opencl_dump:
\*
,lttng_ust_opencl_profiling:
\*
,lttng_ust_opencl_source:
\*
,lttng_ust_opencl_devices:
\*
install-exec-hook
:
$(MKDIR_P)
$(DESTDIR)$(pkglibdir)
/opencl
$(LN_S)
-f
$(DESTDIR)$(libdir)
/libTracerOpenCL.so.1.0.0
$(DESTDIR)$(pkglibdir)
/opencl/libOpenCL.so.1
...
...
utils/dump_trace_format.rb
0 → 100644
View file @
ce4058ca
require
'babeltrace2'
require
'yaml'
require
'find'
require
'set'
path
=
ARGV
[
0
]
trace_location
=
Find
.
find
(
path
).
select
{
|
f
|
File
.
basename
(
f
)
==
"metadata"
}.
collect
{
|
f
|
File
.
dirname
(
f
)
}.
uniq
graph
=
BT2
::
BTGraph
.
new
ctf_fs
=
BT2
::
BTPlugin
.
find
(
"ctf"
).
get_source_component_class_by_name
(
"fs"
)
utils_muxer
=
BT2
::
BTPlugin
.
find
(
"utils"
).
get_filter_component_class_by_name
(
"muxer"
)
printed
=
false
comp1
=
graph
.
add
(
ctf_fs
,
"trace"
,
params:
{
"inputs"
=>
trace_location
})
comp2
=
graph
.
add
(
utils_muxer
,
"mux"
)
comp3
=
graph
.
add_simple_sink
(
"print"
,
lambda
{
|
iterator
,
_
|
mess
=
iterator
.
next_messages
mess
.
each
{
|
m
|
if
!
printed
puts
YAML
.
dump
(
m
.
stream
.
get_class
.
trace_class
.
to_h
)
printed
=
true
end
}
})
comp1
.
output_ports
.
each_with_index
{
|
op
,
i
|
ip
=
comp2
.
input_port
(
i
)
graph
.
connect_ports
(
op
,
ip
)
}
graph
.
connect_ports
(
comp2
.
output_port
(
0
),
comp3
.
input_port
(
0
))
graph
.
run
utils/lttng_dummy_trace.sh
0 → 100755
View file @
ce4058ca
#!/bin/sh
lttng-sessiond
--daemonize
--quiet
lttng create thapi-session
--output
=
./thapi-session
lttng enable-channel
--userspace
--blocking-timeout
=
inf blocking-channel
lttng add-context
--userspace
--channel
=
blocking-channel
-t
vpid
-t
vtid
lttng enable-event
--channel
=
blocking-channel
--userspace
$2
lttng start
LD_PRELOAD
=
$1
rm
lttng stop
lttng destroy
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment