Commit 8bc2ada7 authored by Brendan Gregg's avatar Brendan Gregg

allow isra symbols in wildcards

parent a0d1bc3b
...@@ -167,7 +167,7 @@ std::string AttachedProbe::eventname() const ...@@ -167,7 +167,7 @@ std::string AttachedProbe::eventname() const
{ {
case ProbeType::kprobe: case ProbeType::kprobe:
case ProbeType::kretprobe: case ProbeType::kretprobe:
return eventprefix() + probe_.attach_point + index_str; return eventprefix() + sanitise(probe_.attach_point) + index_str;
case ProbeType::uprobe: case ProbeType::uprobe:
case ProbeType::uretprobe: case ProbeType::uretprobe:
case ProbeType::usdt: case ProbeType::usdt:
...@@ -182,6 +182,10 @@ std::string AttachedProbe::eventname() const ...@@ -182,6 +182,10 @@ std::string AttachedProbe::eventname() const
std::string AttachedProbe::sanitise(const std::string &str) std::string AttachedProbe::sanitise(const std::string &str)
{ {
/*
* Characters such as "." in event names are rejected by the kernel,
* so sanitize:
*/
return std::regex_replace(str, std::regex("[^A-Za-z0-9_]"), "_"); return std::regex_replace(str, std::regex("[^A-Za-z0-9_]"), "_");
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment