mirror of
https://github.com/tobast/libunwind-eh_elf.git
synced 2024-11-15 20:58:13 +01:00
(ia64_find_save_locs): Separate out the no-cache case so we don't
acquire the script-cache lock needlessly. (Logical change 1.122)
This commit is contained in:
parent
8a5d7aad9b
commit
ffb9c88e0a
1 changed files with 36 additions and 29 deletions
|
@ -505,22 +505,29 @@ ia64_find_save_locs (struct cursor *c)
|
||||||
sigset_t saved_sigmask;
|
sigset_t saved_sigmask;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
|
||||||
cache = get_script_cache (c->as, &saved_sigmask);
|
if (unlikely (c->as->caching_policy == UNW_CACHE_NONE))
|
||||||
{
|
|
||||||
if (c->as->caching_policy == UNW_CACHE_NONE)
|
|
||||||
{
|
{
|
||||||
struct ia64_script tmp_script;
|
struct ia64_script tmp_script;
|
||||||
|
|
||||||
if ((ret = ia64_fetch_proc_info (c, c->ip, 1)) < 0)
|
if ((ret = ia64_fetch_proc_info (c, c->ip, 1)) < 0)
|
||||||
goto out;
|
return ret;
|
||||||
|
|
||||||
script = &tmp_script;
|
script = &tmp_script;
|
||||||
script->ip = c->ip;
|
script->ip = c->ip;
|
||||||
script->hint = 0;
|
script->hint = 0;
|
||||||
script->count = 0;
|
script->count = 0;
|
||||||
ret = build_script (c, script);
|
if ((ret = build_script (c, script)) < 0)
|
||||||
|
{
|
||||||
|
if (ret != -UNW_ESTOPUNWIND)
|
||||||
|
dprintf ("%s: failed to build unwind script for ip %lx\n",
|
||||||
|
__FUNCTION__, (long) c->ip);
|
||||||
|
return ret;
|
||||||
}
|
}
|
||||||
else
|
run_script (script, c);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
cache = get_script_cache (c->as, &saved_sigmask);
|
||||||
{
|
{
|
||||||
script = script_lookup (cache, c);
|
script = script_lookup (cache, c);
|
||||||
debug (125, "%s: ip %lx %s in script cache\n",
|
debug (125, "%s: ip %lx %s in script cache\n",
|
||||||
|
@ -543,7 +550,7 @@ ia64_find_save_locs (struct cursor *c)
|
||||||
}
|
}
|
||||||
c->hint = script->hint;
|
c->hint = script->hint;
|
||||||
c->prev_script = script - cache->buckets;
|
c->prev_script = script - cache->buckets;
|
||||||
}
|
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
if (ret != -UNW_ESTOPUNWIND)
|
if (ret != -UNW_ESTOPUNWIND)
|
||||||
|
|
Loading…
Reference in a new issue