设为首页 加入收藏

TOP

简单测试latch nowilling等待模式案例(四)
2019-05-23 14:49:02 】 浏览:222
Tags:简单 测试 latch nowilling 等待 模式 案例
xcl. parent2 l0" lvl=0 whr=2 why=1, SID=295


2019-04-24 09:12:52
Process 21
 holding: 0000000060009978  "test excl. parent2 l0" lvl=0 whr=2 why=1, SID=295


2019-04-24 09:12:53
Process 21
 holding: 0000000060009978  "test excl. parent2 l0" lvl=0 whr=2 why=1, SID=295


2019-04-24 09:12:54
Process 21
 holding: 0000000060009978  "test excl. parent2 l0" lvl=0 whr=2 why=1, SID=295


2019-04-24 09:12:55
Process 21
 holding: 0000000060009978  "test excl. parent2 l0" lvl=0 whr=2 why=1, SID=295


2019-04-24 09:12:56
Process 21
 holding: 0000000060009978  "test excl. parent2 l0" lvl=0 whr=6 why=5, SID=295


2019-04-24 09:12:57
Process 21
 holding: 0000000060009978  "test excl. parent2 l0" lvl=0 whr=6 why=5, SID=295


2019-04-24 09:12:58
Process 21
 holding: 0000000060009978  "test excl. parent2 l0" lvl=0 whr=6 why=5, SID=295


2019-04-24 09:13:00
Process 21
 holding: 0000000060009978  "test excl. parent2 l0" lvl=0 whr=6 why=5, SID=295


2019-04-24 09:13:01
Process 21
 holding: 0000000060009978  "test excl. parent2 l0" lvl=0 whr=6 why=5, SID=295


2019-04-24 09:13:02
Process 21
 holding: 0000000060009978  "test excl. parent2 l0" lvl=0 whr=6 why=5, SID=295


2019-04-24 09:13:03
2019-04-24 09:13:04
--//21=0x15,与peek看到的一致.


3.手工测试看看函数的返回值
--//session 1:
SYS@book> @ exclusive_latch.txt 'test excl. parent2 l0' 0 1 2 60
old  1: SELECT addr laddr FROM v$latch_parent WHERE NAME='&&1'
new  1: SELECT addr laddr FROM v$latch_parent WHERE NAME='test excl. parent2 l0'


LADDR
----------------
0000000060009978


Statement processed.
Function returned 1
Function returned 0


--//session 2:
SYS@book> @ exclusive_latch.txt 'test excl. parent2 l0' 0 3 4 6
old  1: SELECT addr laddr FROM v$latch_parent WHERE NAME='&&1'
new  1: SELECT addr laddr FROM v$latch_parent WHERE NAME='test excl. parent2 l0'


LADDR
----------------
0000000060009978


Statement processed.
Function returned 0


ORA-00600: internal error code, arguments: [510], [0x060009978], [test excl. parent2 l0], [], [], [], [], [], [], [], [], []


--//可以发现申请成功函数返回值是1.失败是0.只所以session 2报错主要原因是没有申请成功,kslfre肯定报错.


4.看看latch统计信息的情况:
SYS@book> select addr,name,level#,latch#,gets,misses,sleeps,immediate_gets,immediate_misses,waiters_woken,waits_holding_latch,spin_gets,wait_time from v$latch_parent  where lower(name) like '%'||lower('test excl. parent2 l0')||'%';
ADDR            NAME                  LEVEL#    LATCH#      GETS    MISSES    SLEEPS IMMEDIATE_GETS IMMEDIATE_MISSES WAITERS_WOKEN WAITS_HOLDING_LATCH  SPIN_GETS  WAIT_TIME
---------------- --------------------- ------ ---------- ---------- ---------- ---------- -------------- ---------------- ------------- ------------------- ---------- ----------
0000000060009978 test excl. parent2 l0      0          5          4          0          0              4                3       

首页 上一页 1 2 3 4 5 下一页 尾页 4/5/5
】【打印繁体】【投稿】【收藏】 【推荐】【举报】【评论】 【关闭】 【返回顶部
上一篇Ubuntu 18.04下OpenCV测试代码 下一篇Python中关于元素替换的一些总结

最新文章

热门文章

Hot 文章

Python

C 语言

C++基础

大数据基础

linux编程基础

C/C++面试题目