From 58d4a6ef4bf33d8630f699d83a1f41511c7f84bd Mon Sep 17 00:00:00 2001 From: Masami Hiramatsu Date: Thu, 11 Aug 2011 20:02:29 +0900 Subject: [PATCH] --- yaml --- r: 263059 b: refs/heads/master c: 8afa2a707d3d1320df5d35966729ac5262da737d h: refs/heads/master i: 263057: b76d3bfe76e9f4f44d1cbf51cc4808e02594c77a 263055: 1814bc3288cea063eda9fbdc2cca7f5221a0e18c v: v3 --- [refs] | 2 +- trunk/tools/perf/util/probe-finder.c | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 682f7518301c..4ee8dcf921b4 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e9b52ef2228cd0bed7a4465c693a39489e2c338d +refs/heads/master: 8afa2a707d3d1320df5d35966729ac5262da737d diff --git a/trunk/tools/perf/util/probe-finder.c b/trunk/tools/perf/util/probe-finder.c index 3e44a3e36519..573c72363223 100644 --- a/trunk/tools/perf/util/probe-finder.c +++ b/trunk/tools/perf/util/probe-finder.c @@ -660,6 +660,7 @@ static int find_variable(Dwarf_Die *sp_die, struct probe_finder *pf) else { /* Search upper class */ nscopes = dwarf_getscopes_die(sp_die, &scopes); + ret = -ENOENT; while (nscopes-- > 1) { pr_debug("Searching variables in %s\n", dwarf_diename(&scopes[nscopes])); @@ -668,14 +669,12 @@ static int find_variable(Dwarf_Die *sp_die, struct probe_finder *pf) pf->pvar->var, 0, &vr_die)) { ret = convert_variable(&vr_die, pf); - goto found; + break; } } if (scopes) free(scopes); - ret = -ENOENT; } -found: if (ret < 0) pr_warning("Failed to find '%s' in this function.\n", pf->pvar->var);