Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 177452
b: refs/heads/master
c: adf365f
h: refs/heads/master
v: v3
  • Loading branch information
Masami Hiramatsu authored and Ingo Molnar committed Dec 15, 2009
1 parent f8e6d64 commit b2c54da
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: abf5ef72477f9fb559a8a034fd6e6c397bb37e1f
refs/heads/master: adf365f486280e4577c9eabd7d8e118e5994a03e
12 changes: 3 additions & 9 deletions trunk/tools/perf/util/probe-event.c
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,6 @@ static void show_perf_probe_event(const char *group, const char *event,
/* List up current perf-probe events */
void show_perf_probe_events(void)
{
unsigned int i;
int fd, nr;
char *group, *event;
struct probe_point pp;
Expand All @@ -415,8 +414,7 @@ void show_perf_probe_events(void)
rawlist = get_trace_kprobe_event_rawlist(fd);
close(fd);

for (i = 0; i < strlist__nr_entries(rawlist); i++) {
ent = strlist__entry(rawlist, i);
strlist__for_each(ent, rawlist) {
parse_trace_kprobe_event(ent->s, &group, &event, &pp);
/* Synthesize only event probe point */
nr = pp.nr_args;
Expand All @@ -436,7 +434,6 @@ void show_perf_probe_events(void)
/* Get current perf-probe event names */
static struct strlist *get_perf_event_names(int fd, bool include_group)
{
unsigned int i;
char *group, *event;
char buf[128];
struct strlist *sl, *rawlist;
Expand All @@ -445,8 +442,7 @@ static struct strlist *get_perf_event_names(int fd, bool include_group)
rawlist = get_trace_kprobe_event_rawlist(fd);

sl = strlist__new(true, NULL);
for (i = 0; i < strlist__nr_entries(rawlist); i++) {
ent = strlist__entry(rawlist, i);
strlist__for_each(ent, rawlist) {
parse_trace_kprobe_event(ent->s, &group, &event, NULL);
if (include_group) {
if (e_snprintf(buf, 128, "%s:%s", group, event) < 0)
Expand Down Expand Up @@ -561,7 +557,6 @@ static void del_trace_kprobe_event(int fd, const char *group,
void del_trace_kprobe_events(struct strlist *dellist)
{
int fd;
unsigned int i;
const char *group, *event;
char *p, *str;
struct str_node *ent;
Expand All @@ -571,8 +566,7 @@ void del_trace_kprobe_events(struct strlist *dellist)
/* Get current event names */
namelist = get_perf_event_names(fd, true);

for (i = 0; i < strlist__nr_entries(dellist); i++) {
ent = strlist__entry(dellist, i);
strlist__for_each(ent, dellist) {
str = strdup(ent->s);
if (!str)
die("Failed to copy event.");
Expand Down

0 comments on commit b2c54da

Please sign in to comment.