projects
/
babeltrace.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ir: disable clock value accessors in non-writer mode
[babeltrace.git]
/
formats
/
ctf
/
ir
/
trace.c
diff --git
a/formats/ctf/ir/trace.c
b/formats/ctf/ir/trace.c
index 686ba798c4a9c1428f6dcc110208433086c16d92..9cce8b6f95c91eaa49af9384075416bf0d80609f 100644
(file)
--- a/
formats/ctf/ir/trace.c
+++ b/
formats/ctf/ir/trace.c
@@
-351,6
+351,15
@@
int bt_ctf_trace_add_clock(struct bt_ctf_trace *trace,
bt_get(clock);
g_ptr_array_add(trace->clocks, clock);
bt_get(clock);
g_ptr_array_add(trace->clocks, clock);
+ if (!trace->is_created_by_writer) {
+ /*
+ * Non-writer mode trace: disable clock value functions
+ * because clock values are per-stream in that
+ * situation.
+ */
+ clock->has_value = 0;
+ }
+
if (trace->frozen) {
bt_ctf_clock_freeze(clock);
}
if (trace->frozen) {
bt_ctf_clock_freeze(clock);
}
This page took
0.023859 seconds
and
4
git commands to generate.