From: David Ahern <dsahern@gmail.com>
To: acme@ghostprotocols.net, linux-kernel@vger.kernel.org
Cc: mingo@kernel.org, peterz@infradead.org, fweisbec@gmail.com,
jolsa@redhat.com, namhyung@kernel.org, eranian@google.com,
David Ahern <dsahern@gmail.com>
Subject: [RFC PATCH 1/4] perf: move setup_list from symbol.c to strlist.c
Date: Fri, 7 Jun 2013 16:22:11 -0600 [thread overview]
Message-ID: <1370643734-9579-2-git-send-email-dsahern@gmail.com> (raw)
In-Reply-To: <1370643734-9579-1-git-send-email-dsahern@gmail.com>
Code move only; no functional changes
Signed-off-by: David Ahern <dsahern@gmail.com>
---
tools/perf/util/strlist.c | 15 +++++++++++++++
tools/perf/util/strlist.h | 2 ++
tools/perf/util/symbol.c | 14 --------------
3 files changed, 17 insertions(+), 14 deletions(-)
diff --git a/tools/perf/util/strlist.c b/tools/perf/util/strlist.c
index eabdce0..faa0e0f 100644
--- a/tools/perf/util/strlist.c
+++ b/tools/perf/util/strlist.c
@@ -170,3 +170,18 @@ struct str_node *strlist__entry(const struct strlist *slist, unsigned int idx)
return snode;
}
+
+int setup_list(struct strlist **list, const char *list_str,
+ const char *list_name)
+{
+ if (list_str == NULL)
+ return 0;
+
+ *list = strlist__new(true, list_str);
+ if (!*list) {
+ pr_err("problems parsing %s list\n", list_name);
+ return -1;
+ }
+
+ return 0;
+}
diff --git a/tools/perf/util/strlist.h b/tools/perf/util/strlist.h
index 5c7f870..a5f433c 100644
--- a/tools/perf/util/strlist.h
+++ b/tools/perf/util/strlist.h
@@ -16,6 +16,8 @@ struct strlist {
bool dupstr;
};
+int setup_list(struct strlist **list, const char *list_str,
+ const char *list_name);
struct strlist *strlist__new(bool dupstr, const char *slist);
void strlist__delete(struct strlist *slist);
diff --git a/tools/perf/util/symbol.c b/tools/perf/util/symbol.c
index 8cf3b54..3ef8be8 100644
--- a/tools/perf/util/symbol.c
+++ b/tools/perf/util/symbol.c
@@ -1164,20 +1164,6 @@ out_fail:
return -1;
}
-static int setup_list(struct strlist **list, const char *list_str,
- const char *list_name)
-{
- if (list_str == NULL)
- return 0;
-
- *list = strlist__new(true, list_str);
- if (!*list) {
- pr_err("problems parsing %s list\n", list_name);
- return -1;
- }
- return 0;
-}
-
static bool symbol__read_kptr_restrict(void)
{
bool value = false;
--
1.7.10.1
next prev parent reply other threads:[~2013-06-07 22:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-07 22:22 [RFC PATCH 0/4] perf: timehist command David Ahern
2013-06-07 22:22 ` David Ahern [this message]
2013-06-07 22:22 ` [RFC PATCH 2/4] perf: add methods for setting/retrieving priv element of thread struct David Ahern
2013-07-19 7:43 ` [tip:perf/core] perf tools: Add methods for setting/ retrieving " tip-bot for David Ahern
2013-06-07 22:22 ` [PATCH 3/4] perf: sample after exit loses thread correlation David Ahern
2013-06-07 22:22 ` [RFC PATCH 4/4] perf: add timehist command David Ahern
2013-06-20 10:46 ` Ingo Molnar
2013-06-20 15:00 ` David Ahern
2013-06-20 15:26 ` Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1370643734-9579-2-git-send-email-dsahern@gmail.com \
--to=dsahern@gmail.com \
--cc=acme@ghostprotocols.net \
--cc=eranian@google.com \
--cc=fweisbec@gmail.com \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.