Lines Matching refs:script

137 		} script;  member
1213 cache_match (struct unw_script *script, unsigned long ip, unsigned long pr) in cache_match() argument
1215 read_lock(&script->lock); in cache_match()
1216 if (ip == script->ip && ((pr ^ script->pr_val) & script->pr_mask) == 0) in cache_match()
1219 read_unlock(&script->lock); in cache_match()
1226 struct unw_script *script = unw.cache + info->hint; in script_lookup() local
1238 if (cache_match(script, ip, pr)) { in script_lookup()
1240 return script; in script_lookup()
1247 script = unw.cache + index; in script_lookup()
1249 if (cache_match(script, ip, pr)) { in script_lookup()
1252 unw.cache[info->prev_script].hint = script - unw.cache; in script_lookup()
1253 return script; in script_lookup()
1255 if (script->coll_chain >= UNW_HASH_SIZE) in script_lookup()
1257 script = unw.cache + script->coll_chain; in script_lookup()
1268 struct unw_script *script, *prev, *tmp; in script_new() local
1272 STAT(++unw.stat.script.news); in script_new()
1279 script = unw.cache + head; in script_new()
1280 unw.lru_head = script->lru_chain; in script_new()
1288 if (!write_trylock(&script->lock)) in script_new()
1296 if (script->ip) { in script_new()
1297 index = hash(script->ip); in script_new()
1301 if (tmp == script) { in script_new()
1318 script->coll_chain = unw.hash[index]; in script_new()
1319 unw.hash[index] = script - unw.cache; in script_new()
1321 script->ip = ip; /* set new IP while we're holding the locks */ in script_new()
1323 STAT(if (script->coll_chain < UNW_CACHE_SIZE) ++unw.stat.script.collisions); in script_new()
1325 script->flags = 0; in script_new()
1326 script->hint = 0; in script_new()
1327 script->count = 0; in script_new()
1328 return script; in script_new()
1332 script_finalize (struct unw_script *script, struct unw_state_record *sr) in script_finalize() argument
1334 script->pr_mask = sr->pr_mask; in script_finalize()
1335 script->pr_val = sr->pr_val; in script_finalize()
1345 script_emit (struct unw_script *script, struct unw_insn insn) in script_emit() argument
1347 if (script->count >= UNW_MAX_SCRIPT_LEN) { in script_emit()
1352 script->insn[script->count++] = insn; in script_emit()
1356 emit_nat_info (struct unw_state_record *sr, int i, struct unw_script *script) in emit_nat_info() argument
1397 script_emit(script, insn); in emit_nat_info()
1401 compile_reg (struct unw_state_record *sr, int i, struct unw_script *script) in compile_reg() argument
1482 script_emit(script, insn); in compile_reg()
1484 emit_nat_info(sr, i, script); in compile_reg()
1495 script_emit(script, insn); in compile_reg()
1529 struct unw_script *script = NULL; in build_script() local
1541 STAT(++unw.stat.script.builds; start = ia64_get_itc()); in build_script()
1550 script = script_new(ip); in build_script()
1551 if (!script) { in build_script()
1553 STAT(unw.stat.script.build_time += ia64_get_itc() - start); in build_script()
1556 unw.cache[info->prev_script].hint = script - unw.cache; in build_script()
1590 compile_reg(&sr, UNW_REG_RP, script); in build_script()
1591 script_finalize(script, &sr); in build_script()
1592 STAT(unw.stat.script.parse_time += ia64_get_itc() - parse_start); in build_script()
1593 STAT(unw.stat.script.build_time += ia64_get_itc() - start); in build_script()
1594 return script; in build_script()
1624 script->flags = sr.flags; in build_script()
1664 STAT(unw.stat.script.parse_time += ia64_get_itc() - parse_start); in build_script()
1679 script_emit(script, insn); in build_script()
1692 compile_reg(&sr, i, script); in build_script()
1695 compile_reg(&sr, i, script); in build_script()
1706 STAT(unw.stat.script.parse_time += ia64_get_itc() - parse_start); in build_script()
1708 script_finalize(script, &sr); in build_script()
1709 STAT(unw.stat.script.build_time += ia64_get_itc() - start); in build_script()
1710 return script; in build_script()
1719 run_script (struct unw_script *script, struct unw_frame_info *state) in run_script() argument
1726 STAT(++unw.stat.script.runs; start = ia64_get_itc()); in run_script()
1727 state->flags = script->flags; in run_script()
1728 ip = script->insn; in run_script()
1729 limit = script->insn + script->count; in run_script()
1816 STAT(unw.stat.script.run_time += ia64_get_itc() - start); in run_script()