When try to start perf ftrace
I get following error
write '' to tracing/tracing_cpumask failed: Invalid argument
failed to reset ftrace
However my kernel configured ftrace enabled and trace-cmd
ftrace frontend also works as well.
For some reason in the perf/builtin-ftrace.c
file in the write_tracing_file
function I get
static int __write_tracing_file(const char *name, const char *val, bool append)
{
char *file;
int fd, ret = -1;
ssize_t size = strlen(val);
I got val
== an empty string, therefore size
== 0
Then at the following section
if (write(fd, val_copy, size + 1) == size + 1)
ret = 0;
else
pr_debug("write '%s' to tracing/%s failed: %s\n",
val, name, str_error_r(errno, errbuf, sizeof(errbuf)));
I got size = 0
and which not ok. So something wrong with the CPU mask part but I have no clue what.
Edit: looks like its work with multicore system without problem, but not in single core system. Strange...