Remove asserts on str probe names
`open_kprobes` is a dict of open kprobes. Its keys are strings for normal probes and a tuple for perf buffers. Normal probes need unregistering on script exit; perf buffers do not. `cleanup` currently looks for string keys (specifically type `str`) when working out what to unregister, which is a bit brittle -- in Python2 strings can be both native `str` and `unicode`, depending what exactly was passed to `attach-*/detach_*` and whether `from __future__ import unicode_literals` is used (e.g. #623). This diff makes the API more relaxed by casting the probe name to `str` to match the expectations of `cleanup`. This works in py2 (with and without unicode_literals) and py3.
Showing
Please register or sign in to comment