• Home
  • Raw
  • Download

Lines Matching full:script

66 cache_match (struct ia64_script *script, unw_word_t ip, unw_word_t pr)  in cache_match()  argument
68 if (ip == script->ip && ((pr ^ script->pr_val) & script->pr_mask) == 0) in cache_match()
130 struct ia64_script *script = cache->buckets + c->hint; in script_lookup() local
137 if (cache_match (script, ip, pr)) in script_lookup()
138 return script; in script_lookup()
144 script = cache->buckets + index; in script_lookup()
147 if (cache_match (script, ip, pr)) in script_lookup()
151 (script - cache->buckets); in script_lookup()
152 return script; in script_lookup()
154 if (script->coll_chain >= IA64_UNW_HASH_SIZE) in script_lookup()
156 script = cache->buckets + script->coll_chain; in script_lookup()
161 script_init (struct ia64_script *script, unw_word_t ip) in script_init() argument
163 script->ip = ip; in script_init()
164 script->hint = 0; in script_init()
165 script->count = 0; in script_init()
166 script->abi_marker = 0; in script_init()
172 struct ia64_script *script, *prev, *tmp; in script_new() local
177 script = cache->buckets + head; in script_new()
178 cache->lru_head = script->lru_chain; in script_new()
180 /* re-insert script at the tail of the LRU chain: */ in script_new()
184 /* remove the old script from the hash table (if it's there): */ in script_new()
185 if (script->ip) in script_new()
187 index = hash (script->ip); in script_new()
192 if (tmp == script) in script_new()
203 /* old script wasn't in the hash-table */ in script_new()
209 /* enter new script in the hash table */ in script_new()
211 script->coll_chain = cache->hash[index]; in script_new()
212 cache->hash[index] = script - cache->buckets; in script_new()
214 script_init (script, ip); in script_new()
215 return script; in script_new()
219 script_finalize (struct ia64_script *script, struct cursor *c, in script_finalize() argument
222 script->pr_mask = sr->pr_mask; in script_finalize()
223 script->pr_val = sr->pr_val; in script_finalize()
224 script->pi = c->pi; in script_finalize()
228 script_emit (struct ia64_script *script, struct ia64_script_insn insn) in script_emit() argument
230 if (script->count >= IA64_MAX_SCRIPT_LEN) in script_emit()
232 Dprintf ("%s: script exceeds maximum size of %u instructions!\n", in script_emit()
236 script->insn[script->count++] = insn; in script_emit()
241 struct ia64_script *script) in compile_reg() argument
351 script_emit (script, insn); in compile_reg()
359 script_emit (script, insn); in compile_reg()
410 /* Build an unwind script that unwinds from state OLD_STATE to the
414 build_script (struct cursor *c, struct ia64_script *script) in build_script() argument
437 script_emit (script, insn); in build_script()
440 compile_reg (&sr, IA64_REG_PSP, sr.curr.reg + IA64_REG_PSP, script); in build_script()
462 compile_reg (&sr, IA64_REG_PRI_UNAT_MEM, pri_unat, script); in build_script()
469 compile_reg (&sr, regorder[i], sr.curr.reg + regorder[i], script); in build_script()
471 script->abi_marker = sr.abi_marker; in build_script()
472 script_finalize (script, c, &sr); in build_script()
493 run_script (struct ia64_script *script, struct cursor *c) in run_script() argument
502 c->pi = script->pi; in run_script()
503 ip = script->insn; in run_script()
504 limit = script->insn + script->count; in run_script()
506 c->abi_marker = script->abi_marker; in run_script()
598 struct ia64_script script; in uncached_find_save_locs() local
604 script_init (&script, c->ip); in uncached_find_save_locs()
605 if ((ret = build_script (c, &script)) < 0) in uncached_find_save_locs()
608 Dprintf ("%s: failed to build unwind script for ip %lx\n", in uncached_find_save_locs()
612 return run_script (&script, c); in uncached_find_save_locs()
619 struct ia64_script *script = NULL; in ia64_find_save_locs() local
629 Debug (1, "contention on script-cache; doing uncached lookup\n"); in ia64_find_save_locs()
633 script = script_lookup (cache, c); in ia64_find_save_locs()
634 Debug (8, "ip %lx %s in script cache\n", (long) c->ip, in ia64_find_save_locs()
635 script ? "hit" : "missed"); in ia64_find_save_locs()
637 if (!script || (script->count == 0 && !script->pi.unwind_info)) in ia64_find_save_locs()
643 if (!script) in ia64_find_save_locs()
645 script = script_new (cache, c->ip); in ia64_find_save_locs()
646 if (!script) in ia64_find_save_locs()
648 Dprintf ("%s: failed to create unwind script\n", __FUNCTION__); in ia64_find_save_locs()
653 cache->buckets[c->prev_script].hint = script - cache->buckets; in ia64_find_save_locs()
655 if (script->count == 0) in ia64_find_save_locs()
656 ret = build_script (c, script); in ia64_find_save_locs()
658 assert (script->count > 0); in ia64_find_save_locs()
660 c->hint = script->hint; in ia64_find_save_locs()
661 c->prev_script = script - cache->buckets; in ia64_find_save_locs()
666 Dprintf ("%s: failed to locate/build unwind script for ip %lx\n", in ia64_find_save_locs()
671 ret = run_script (script, c); in ia64_find_save_locs()
696 struct ia64_script *script; in ia64_cache_proc_info() local
705 script = script_lookup (cache, c); in ia64_cache_proc_info()
706 if (script) in ia64_cache_proc_info()
709 script = script_new (cache, c->ip); in ia64_cache_proc_info()
710 if (!script) in ia64_cache_proc_info()
712 Dprintf ("%s: failed to create unwind script\n", __FUNCTION__); in ia64_cache_proc_info()
717 script->pi = c->pi; in ia64_cache_proc_info()
728 struct ia64_script *script; in ia64_get_cached_proc_info() local
735 script = script_lookup (cache, c); in ia64_get_cached_proc_info()
736 if (script) in ia64_get_cached_proc_info()
737 c->pi = script->pi; in ia64_get_cached_proc_info()
740 return script ? 0 : -UNW_ENOINFO; in ia64_get_cached_proc_info()