ITPub博客

首页 > 数据库 > Oracle > [20191217]Oracle C functions annotations.txt

[20191217]Oracle C functions annotations.txt

原创 Oracle 作者:lfree 时间:2019-12-17 11:06:38 0 删除 编辑

[20191217]Oracle C functions annotations.txt

--//网站orafun.info可以查询oracle c functions.Created by Frits Hoogland with a little help from Kamil Stawiarski.
--//可以通过它了解oracle 内部C 函数.
--//比如前一阵子链接的测试:http://blog.itpub.net/267265/viewspace-2665273/=>[20191122]oracel SQL parsing function qcplgte.txt

qcplgte - query compile parse lexer group SQL text (?)

1.例子1:
#  perf top -k /u01/app/oracle/product/11.2.0.4/dbhome_1/bin/oracle

PerfTop:   10564 irqs/sec  kernel:32.9%  exact:  0.0% [1000Hz cycles],  (all, 24 CPUs)
-------------------------------------------------------------------------------------------------

          samples  pcnt function             DSO
          _______ _____ ____________________ ___________________________________________________

          2369.00  5.7% kdstf11001010000km   /u01/app/oracle/product/11.2.0.4/dbhome_1/bin/oracle
          2298.00  5.5% kaf4reasrp1km        /u01/app/oracle/product/11.2.0.4/dbhome_1/bin/oracle
          1781.00  4.3% kcbgtcr              /u01/app/oracle/product/11.2.0.4/dbhome_1/bin/oracle
          1304.00  3.1% kaf4reasrp0km        /u01/app/oracle/product/11.2.0.4/dbhome_1/bin/oracle
          1266.00  3.0% kxhrPack             /u01/app/oracle/product/11.2.0.4/dbhome_1/bin/oracle
           781.00  1.9% kdstf11001000000km   /u01/app/oracle/product/11.2.0.4/dbhome_1/bin/oracle

--//进入网站orafun.info输入:kdstf11001010000km

Oracle C functions annotations
  (kdstf)11001010000km - kernel data seek/scan table full ultra fast scan ??

  (kaf)4reasrp1km - kernel access fetch ??

  kcbgtcr - kernel cache buffers get consistent read  --->这个就是逻辑读.

2.例子2:

SCOTT@book> @ spid
       SID    SERIAL# PROCESS                  SERVER    SPID       PID  P_SERIAL# C50
---------- ---------- ------------------------ --------- ------ ------- ---------- --------------------------------------------------
       295         15 54304                    DEDICATED 54305       21          8 alter system kill session '295,15' immediate;

SCOTT@book> select count(*) from emp,emp,dba_objects,dba_objects ;

$ pstack 54305
#0  0x0000000009726543 in qersoFetch ()
#1  0x000000000970b15d in qerjotFetch ()
#2  0x000000000256715f in qergsFetch ()
#3  0x00000000095b5776 in opifch2 ()
#4  0x0000000001ba5c5d in kpoal8 ()
#5  0x00000000095bbdad in opiodr ()
#6  0x00000000097a629f in ttcpip ()
#7  0x000000000186470e in opitsk ()
#8  0x0000000001869235 in opiino ()
#9  0x00000000095bbdad in opiodr ()
#10 0x00000000018607ac in opidrv ()
#11 0x0000000001e3a48f in sou2o ()
#12 0x0000000000a29265 in opimai_real ()
#13 0x0000000001e407ad in ssthrdmain ()
#14 0x0000000000a291d1 in main ()

qersoFetch - query execute rowsource sort fetch from from a sort row source
qerjotFetch - query execute rowsource nested loop outer join tunneling fetch

3.显示stack:
http://orafun.info/stack/,copy and paste上面内容,显示如下:

Parsed stack:
Discovered stack type: gdb/pstack stack
Parsed gdb/pstack stack:
#0 0x0000000009726543 in qersoFetch ()             query execute rowsource sort fetch from from a sort row source  
#1 0x000000000970b15d in qerjotFetch ()            query execute rowsource nested loop outer join tunneling fetch
#2 0x000000000256715f in qergsFetch ()             query execute rowsource group by sort fetch
#3 0x00000000095b5776 in opifch2 ()                oracle program interface oracle side of the fetch interface main routine
#4 0x0000000001ba5c5d in kpoal8 ()                 kernel programmatic interface oracle V8 bundled execution
#5 0x00000000095bbdad in opiodr ()                 oracle program interface oracle code request driver, route the current request
#6 0x00000000097a629f in ttcpip ()                 two task common pipe read/write
#7 0x000000000186470e in opitsk ()                 oracle program interface two task function dispatcher
#8 0x0000000001869235 in opiino ()                 oracle program interface initialize opi
#9 0x00000000095bbdad in opiodr ()                 oracle program interface oracle code request driver, route the current request
#10 0x00000000018607ac in opidrv ()                oracle program interface route current request driver, entry side into two task interface
#11 0x0000000001e3a48f in sou2o ()                 main oracle executable entry point
#12 0x0000000000a29265 in opimai_real ()           oracle program interface main real oracle start point
#13 0x0000000001e407ad in ssthrdmain ()            operating system dependent system main for every thread in a threaded oracle
#14 0x0000000000a291d1 in main ()                  (non oracle)general c starting function

--//也许对于诊断与学习orcle内部函数有用.

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/267265/viewspace-2668950/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
熟悉oracle相关技术,擅长sql优化,rman备份与恢复,熟悉linux shell编程。

注册时间:2008-01-03

  • 博文量
    4006
  • 访问量
    7969378