Commit e7ca49fb authored by Brendan Gregg's avatar Brendan Gregg Committed by GitHub

Merge pull request #163 from danobi/wildcard_invalid_file

Supress invalid file warning for wildcarded tracepoints
parents 6f8b6bc6 d753b875
......@@ -30,7 +30,9 @@ void TracepointFormatParser::parse(ast::Program *program)
std::string &event_name = ap->func;
std::string format_file_path = "/sys/kernel/debug/tracing/events/" + category + "/" + event_name + "/format";
std::ifstream format_file(format_file_path.c_str());
if (format_file.fail())
// Only bail on error if the attachpoint isn't wildcarded
if (format_file.fail() && format_file_path.find('*') == std::string::npos)
{
std::cerr << strerror(errno) << ": " << format_file_path << std::endl;
return;
......
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