~ubuntu-branches/ubuntu/utopic/babeltrace/utopic

« back to all changes in this revision

Viewing changes to formats/ctf-text/ctf-text.c

  • Committer: Stéphane Graber
  • Date: 2012-04-20 12:29:45 UTC
  • mfrom: (1.1.4)
  • Revision ID: stgraber@ubuntu.com-20120420122945-kg29fg1eck7tt2v8
Megre 1.0.0~rc1

Show diffs side-by-side

added added

removed removed

Lines of Context:
211
211
}
212
212
 
213
213
static
214
 
int ctf_text_write_event(struct stream_pos *ppos, struct ctf_stream *stream)
 
214
int ctf_text_write_event(struct stream_pos *ppos, struct ctf_stream_definition *stream)
215
215
                         
216
216
{
217
217
        struct ctf_text_stream_pos *pos =
218
218
                container_of(ppos, struct ctf_text_stream_pos, parent);
219
 
        struct ctf_stream_class *stream_class = stream->stream_class;
 
219
        struct ctf_stream_declaration *stream_class = stream->stream_class;
220
220
        int field_nr_saved;
221
 
        struct ctf_event *event_class;
222
 
        struct ctf_stream_event *event;
 
221
        struct ctf_event_declaration *event_class;
 
222
        struct ctf_event_definition *event;
223
223
        uint64_t id;
224
224
        int ret;
225
225
        int dom_print = 0;
236
236
                return -EINVAL;
237
237
        }
238
238
        event_class = g_ptr_array_index(stream_class->events_by_id, id);
239
 
        if (!event) {
240
 
                fprintf(stderr, "[error] Event id %" PRIu64 " is unknown.\n", id);
 
239
        if (!event_class) {
 
240
                fprintf(stderr, "[error] Event class id %" PRIu64 " is unknown.\n", id);
241
241
                return -EINVAL;
242
242
        }
243
243
 
249
249
                ctf_print_timestamp(stderr, stream, stream->prev_timestamp);
250
250
                fprintf(stderr, "] and [");
251
251
                ctf_print_timestamp(stderr, stream, stream->prev_timestamp_end);
252
 
                fprintf(stderr, "]. You should consider increasing the buffer size.\n");
 
252
                fprintf(stderr, "]. You should consider recording a new trace with larger buffers or with fewer events enabled.\n");
253
253
                fflush(stderr);
254
254
                stream->events_discarded = 0;
255
255
        }