Class: Babeltrace::CTF::Trace

Inherits:
Trace
  • Object
show all
Defined in:
lib/babeltrace/ctf/events.rb,
lib/babeltrace/ctf/iterator.rb

Instance Attribute Summary

Attributes inherited from Trace

#context, #handle_id

Instance Method Summary collapse

Methods inherited from Trace

#get_path, #get_timestamp_begin, #get_timestamp_end, #initialize

Constructor Details

This class inherits a constructor from Babeltrace::Trace

Instance Method Details

#get_event_decl_listObject



189
190
191
192
193
194
195
196
# File 'lib/babeltrace/ctf/events.rb', line 189

def get_event_decl_list
  count = FFI::MemoryPointer::new(:uint)
  list = FFI::MemoryPointer::new(:pointer)
  res = CTF.bt_ctf_get_event_decl_list(@handle_id, @context, list, count)
  count = count.read(:uint)
  list = list.read_pointer.read_array_of_pointer(count)
  list.collect { |p| Internal::EventDecl::new(p) }
end

#iter_create(begin_pos: nil, end_pos: nil) ⇒ Object



4
5
6
# File 'lib/babeltrace/ctf/iterator.rb', line 4

def iter_create(begin_pos: nil, end_pos: nil)
  CTF.bt_ctf_iter_create(@context, begin_pos, end_pos)
end

#iter_create_intersectObject



8
9
10
11
12
13
14
15
# File 'lib/babeltrace/ctf/iterator.rb', line 8

def iter_create_intersect
  begin_pos_ptr = FFI::MemoryPointer::new(:pointer)
  end_pos_ptr = FFI::MemoryPointer::new(:pointer)
  iter = CTF.bt_ctf_iter_create_intersect(@context, begin_pos_ptr, end_pos_ptr)
  begin_pos = IterPosManaged::new(begin_pos_ptr.read_pointer)
  end_pos = IterPosManaged::new(end_pos_ptr.read_pointer)
  [iter, begin_pos, end_pos]
end