Class: Bpfql::Query::ProbeOption

Inherits:
Struct
  • Object
show all
Defined in:
lib/bpfql/query.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(probe) ⇒ ProbeOption

Returns a new instance of ProbeOption.



45
46
47
48
# File 'lib/bpfql/query.rb', line 45

def initialize(probe)
  # FIXME: complcated probe, e.g. uprobe and USDT has 4 sections
  super(*probe.split(':'))
end

Instance Attribute Details

#arg1Object

Returns the value of attribute arg1

Returns:

  • (Object)

    the current value of arg1



44
45
46
# File 'lib/bpfql/query.rb', line 44

def arg1
  @arg1
end

#arg2Object

Returns the value of attribute arg2

Returns:

  • (Object)

    the current value of arg2



44
45
46
# File 'lib/bpfql/query.rb', line 44

def arg2
  @arg2
end

#typeObject

Returns the value of attribute type

Returns:

  • (Object)

    the current value of type



44
45
46
# File 'lib/bpfql/query.rb', line 44

def type
  @type
end

Instance Method Details

#kprobe?Boolean

Returns:

  • (Boolean)


54
55
56
# File 'lib/bpfql/query.rb', line 54

def kprobe?
  self.type == "kprobe"
end

#to_sObject



66
67
68
# File 'lib/bpfql/query.rb', line 66

def to_s
  [type, arg1, arg2].join ":"
end

#tracepoint?Boolean

Returns:

  • (Boolean)


50
51
52
# File 'lib/bpfql/query.rb', line 50

def tracepoint?
  self.type == "tracepoint"
end

#uprobe?Boolean

Returns:

  • (Boolean)


58
59
60
# File 'lib/bpfql/query.rb', line 58

def uprobe?
  self.type == "uprobe"
end

#usdt?Boolean

Returns:

  • (Boolean)


62
63
64
# File 'lib/bpfql/query.rb', line 62

def usdt?
  self.type == "usdt"
end