summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/probe-file.c
diff options
context:
space:
mode:
authorMasami Hiramatsu <mhiramat@kernel.org>2016-07-12 19:05:04 +0900
committerArnaldo Carvalho de Melo <acme@redhat.com>2016-07-13 23:09:06 -0300
commit05bf2c8a2a819132b4a8f35d4315ff22e8e84a20 (patch)
tree3c7321e4c1125597e8a57c166ed5bf5c0a0b5f54 /tools/perf/util/probe-file.c
parentc3492a3a4e58117f18d96125e67b0bed7c4231e1 (diff)
downloadop-kernel-dev-05bf2c8a2a819132b4a8f35d4315ff22e8e84a20.zip
op-kernel-dev-05bf2c8a2a819132b4a8f35d4315ff22e8e84a20.tar.gz
perf probe-cache: Add for_each_probe_cache_entry() wrapper
Add for_each_probe_cache_entry() wrapper macro for hiding list in probe_cache. Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org> Cc: Ananth N Mavinakayanahalli <ananth@linux.vnet.ibm.com> Cc: Brendan Gregg <brendan.d.gregg@gmail.com> Cc: Hemant Kumar <hemant@linux.vnet.ibm.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <peterz@infradead.org> Link: http://lkml.kernel.org/r/146831790386.17065.15082256697569419710.stgit@devbox Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/probe-file.c')
-rw-r--r--tools/perf/util/probe-file.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tools/perf/util/probe-file.c b/tools/perf/util/probe-file.c
index a5059dc..abfb05c 100644
--- a/tools/perf/util/probe-file.c
+++ b/tools/perf/util/probe-file.c
@@ -546,7 +546,7 @@ probe_cache__find(struct probe_cache *pcache, struct perf_probe_event *pev)
if (!cmd)
return NULL;
- list_for_each_entry(entry, &pcache->entries, node) {
+ for_each_probe_cache_entry(entry, pcache) {
if (pev->sdt) {
if (entry->pev.event &&
streql(entry->pev.event, pev->event) &&
@@ -576,7 +576,7 @@ probe_cache__find_by_name(struct probe_cache *pcache,
{
struct probe_cache_entry *entry = NULL;
- list_for_each_entry(entry, &pcache->entries, node) {
+ for_each_probe_cache_entry(entry, pcache) {
/* Hit if same event name or same command-string */
if (streql(entry->pev.group, group) &&
streql(entry->pev.event, event))
@@ -748,7 +748,7 @@ int probe_cache__commit(struct probe_cache *pcache)
if (ret < 0)
goto out;
- list_for_each_entry(entry, &pcache->entries, node) {
+ for_each_probe_cache_entry(entry, pcache) {
ret = probe_cache_entry__write(entry, pcache->fd);
pr_debug("Cache committed: %d\n", ret);
if (ret < 0)
@@ -790,7 +790,7 @@ static int probe_cache__show_entries(struct probe_cache *pcache,
{
struct probe_cache_entry *entry;
- list_for_each_entry(entry, &pcache->entries, node) {
+ for_each_probe_cache_entry(entry, pcache) {
if (probe_cache_entry__compare(entry, filter))
printf("%s\n", entry->spev);
}
OpenPOWER on IntegriCloud