diff options
author | Sage Weil <sage@inktank.com> | 2013-08-15 14:11:45 -0400 |
---|---|---|
committer | Sage Weil <sage@inktank.com> | 2013-08-15 14:11:45 -0400 |
commit | ee3e542fec6e69bc9fb668698889a37d93950ddf (patch) | |
tree | e74ee766a4764769ef1d3d45d266b4dea64101d3 /tools/perf/util/dso.c | |
parent | fe2a801b50c0bb8039d627e5ae1fec249d10ff39 (diff) | |
parent | f1d6e17f540af37bb1891480143669ba7636c4cf (diff) |
Merge remote-tracking branch 'linus/master' into testing
Diffstat (limited to 'tools/perf/util/dso.c')
-rw-r--r-- | tools/perf/util/dso.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/tools/perf/util/dso.c b/tools/perf/util/dso.c index 6f7d5a9d6b05..c4374f07603c 100644 --- a/tools/perf/util/dso.c +++ b/tools/perf/util/dso.c | |||
@@ -513,10 +513,16 @@ void dsos__add(struct list_head *head, struct dso *dso) | |||
513 | list_add_tail(&dso->node, head); | 513 | list_add_tail(&dso->node, head); |
514 | } | 514 | } |
515 | 515 | ||
516 | struct dso *dsos__find(struct list_head *head, const char *name) | 516 | struct dso *dsos__find(struct list_head *head, const char *name, bool cmp_short) |
517 | { | 517 | { |
518 | struct dso *pos; | 518 | struct dso *pos; |
519 | 519 | ||
520 | if (cmp_short) { | ||
521 | list_for_each_entry(pos, head, node) | ||
522 | if (strcmp(pos->short_name, name) == 0) | ||
523 | return pos; | ||
524 | return NULL; | ||
525 | } | ||
520 | list_for_each_entry(pos, head, node) | 526 | list_for_each_entry(pos, head, node) |
521 | if (strcmp(pos->long_name, name) == 0) | 527 | if (strcmp(pos->long_name, name) == 0) |
522 | return pos; | 528 | return pos; |
@@ -525,7 +531,7 @@ struct dso *dsos__find(struct list_head *head, const char *name) | |||
525 | 531 | ||
526 | struct dso *__dsos__findnew(struct list_head *head, const char *name) | 532 | struct dso *__dsos__findnew(struct list_head *head, const char *name) |
527 | { | 533 | { |
528 | struct dso *dso = dsos__find(head, name); | 534 | struct dso *dso = dsos__find(head, name, false); |
529 | 535 | ||
530 | if (!dso) { | 536 | if (!dso) { |
531 | dso = dso__new(name); | 537 | dso = dso__new(name); |