perf symbols: Do not read symbols/data from device files
With mem sampling we could get data source within mapped device file. Processing such sample would block during report phase on trying to read the device file. Chacking for device files and skip the processing if it's detected. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Cc: David Ahern <dsahern@gmail.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Link: http://lkml.kernel.org/r/1453290995-18485-2-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:

committed by
Arnaldo Carvalho de Melo

parent
d85ce830ee
commit
403567217d
@@ -691,3 +691,13 @@ out:
|
||||
|
||||
return tip;
|
||||
}
|
||||
|
||||
bool is_regular_file(const char *file)
|
||||
{
|
||||
struct stat st;
|
||||
|
||||
if (stat(file, &st))
|
||||
return false;
|
||||
|
||||
return S_ISREG(st.st_mode);
|
||||
}
|
||||
|
Reference in New Issue
Block a user