Project

General

Profile

Actions

Bug #1130

closed

Possible event name duplication using --probe and --function

Added by Francis Deslauriers over 6 years ago. Updated over 6 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
09/25/2017
Due date:
% Done:

0%

Estimated time:

Description

--probe and --function instrumentation options allow for custom event names.
This has the effect of making it possible to successfully enabling multiple events with the same name but of different types.
For example:

lttng enable-event -k --function=sys_open sched_switch
lttng enable-event -k --probe=sys_read sched_switch
lttng enable-event -k sched_switch

I am not quite sure what approach we should take on this issue. The event name duplication seems problematic. The most straightforward solution is comparing the new event's name to already enabled names but it's incomplete because that would open the possibility of preventing the enabling of kernel tracepoints(e.g. sched_switch) by the prior enabling --probe/--function events.

An approach would be to prepend a string to the --probe/--function event names to make them unique.
We could also simply document this behaviour as it's probably impacting very few users

Any thoughts?

Actions #1

Updated by Mathieu Desnoyers over 6 years ago

I'm tempted to simply fail when a duplicate name is being enabled.

If a user end up shooting itself in the foot by naming a kprobe "sched_switch", too bad.. the user breaks it, it keeps the pieces... ;)

It won't trigger any issue per se, it's just that the sched_switch tracepoint will not be available for that session.

We should of course document this.

Actions #2

Updated by Francis Deslauriers over 6 years ago

  • Status changed from New to Resolved
  • Estimated time set to 100.00 h
Actions #3

Updated by Francis Deslauriers over 6 years ago

  • Estimated time deleted (100.00 h)

Closing this issue as duplicate of #938.

Actions

Also available in: Atom PDF