2 * BabelTrace - Dummy Output
4 * Copyright 2010-2011 EfficiOS Inc. and Linux Foundation
6 * Author: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
8 * Permission is hereby granted, free of charge, to any person obtaining a copy
9 * of this software and associated documentation files (the "Software"), to deal
10 * in the Software without restriction, including without limitation the rights
11 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 * copies of the Software, and to permit persons to whom the Software is
13 * furnished to do so, subject to the following conditions:
15 * The above copyright notice and this permission notice shall be included in
16 * all copies or substantial portions of the Software.
19 #include <babeltrace/ctf-text/types.h>
20 #include <babeltrace/format.h>
21 #include <babeltrace/babeltrace-internal.h>
25 #include <sys/types.h>
34 int bt_dummy_write_event(struct stream_pos
*ppos
, struct ctf_stream
*stream
)
40 struct trace_descriptor
*bt_dummy_open_trace(const char *path
, int flags
,
41 void (*packet_seek
)(struct stream_pos
*pos
, size_t index
,
42 int whence
), FILE *metadata_fp
)
44 struct ctf_text_stream_pos
*pos
;
46 pos
= g_new0(struct ctf_text_stream_pos
, 1);
47 pos
->parent
.rw_table
= NULL
;
48 pos
->parent
.event_cb
= bt_dummy_write_event
;
49 return &pos
->trace_descriptor
;
53 void bt_dummy_close_trace(struct trace_descriptor
*td
)
55 struct ctf_text_stream_pos
*pos
=
56 container_of(td
, struct ctf_text_stream_pos
,
62 struct format bt_dummy_format
= {
63 .open_trace
= bt_dummy_open_trace
,
64 .close_trace
= bt_dummy_close_trace
,
68 void __attribute__((constructor
)) bt_dummy_init(void)
72 bt_dummy_format
.name
= g_quark_from_static_string("dummy");
73 ret
= bt_register_format(&bt_dummy_format
);
This page took 0.032025 seconds and 4 git commands to generate.