2b438347 | 14-Jul-2016 |
Wang Nan <wangnan0@huawei.com> |
tools lib fd array: Allow associating a pointer cookie with each entry
Add a 'ptr' field to fdarray->priv array.
This feature will be used by following commits, which introduce muiltiple 'struct pe
tools lib fd array: Allow associating a pointer cookie with each entry
Add a 'ptr' field to fdarray->priv array.
This feature will be used by following commits, which introduce muiltiple 'struct perf_mmap' arrays for different types of mapping.
Because of this, during fdarray__filter(), a simple 'idx' is not enough.
Add a pointer cookie that allows to directly associate a 'struct perf_mmap' pointer to an fdarray entry.
Signed-off-by: Wang Nan <wangnan0@huawei.com> Acked-by: Jiri Olsa <jolsa@kernel.org> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: He Kuang <hekuang@huawei.com> Cc: Masami Hiramatsu <mhiramat@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Nilay Vaish <nilayvaish@gmail.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Zefan Li <lizefan@huawei.com> Cc: pi3orama@163.com Link: http://lkml.kernel.org/r/1468485287-33422-3-git-send-email-wangnan0@huawei.com Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
show more ...
|
51c0396c | 14-Feb-2016 |
Jiri Olsa <jolsa@kernel.org> |
tools lib api fs: Add sysfs__read_str function
Adding sysfs__read_str function to ease up reading string files from sysfs. New interface is:
int sysfs__read_str(const char *entry, char **buf, siz
tools lib api fs: Add sysfs__read_str function
Adding sysfs__read_str function to ease up reading string files from sysfs. New interface is:
int sysfs__read_str(const char *entry, char **buf, size_t *sizep);
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/1455465826-8426-4-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
show more ...
|
607bfbd7 | 14-Feb-2016 |
Jiri Olsa <jolsa@kernel.org> |
tools lib api fs: Adopt filename__read_str from perf
We already moved similar functions in here, also it'll be useful for sysfs__read_str addition in following patch.
Signed-off-by: Jiri Olsa <jols
tools lib api fs: Adopt filename__read_str from perf
We already moved similar functions in here, also it'll be useful for sysfs__read_str addition in following patch.
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/1455465826-8426-3-git-send-email-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
show more ...
|
09f6acf2 | 10-Sep-2015 |
Arnaldo Carvalho de Melo <acme@redhat.com> |
tools lib api cpu: Introduce cpu.[ch] to obtain cpu related information
E.g.:
$ ./cpu__get_max_freq 3200000
It does that, as Kan's patch does, by looking at these files:
$ cat /sys/devices/sy
tools lib api cpu: Introduce cpu.[ch] to obtain cpu related information
E.g.:
$ ./cpu__get_max_freq 3200000
It does that, as Kan's patch does, by looking at these files:
$ cat /sys/devices/system/cpu/online 0-3 $ ./sysfs__read_ull devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq=3200000 $
I.e. find out the first online CPU, then read its cpufreq info.
But do it in tools/lib/api/, so that other tools/ living code can use it, not just perf.
Based-on-a-patch-by: Kan Liang <kan.liang@intel.com> Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Borislav Petkov <bp@suse.de> Cc: David Ahern <dsahern@gmail.com> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Jiri Olsa <jolsa@redhat.com> Cc: Kan Liang <kan.liang@intel.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Stephane Eranian <eranian@google.com> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-915v4cvxqplaub8qco66b9mv@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
show more ...
|