Few days ago i published a blog post talking about write consistency & DML restart . During my investigation i was interested in the function “dmltrace” and i noticed that this function was instrumented with the dbk*/dbg* debug functions introduced in 11g.
The question is how to enable this tracing facility ? Which events are checked by that function ?
We know how to extract the trace events number from the old ksdpec function (kernel service debug internal errors parser post event and check trigger condition using http://orafun.info/ of course 😀 ) thank to Dennis Yurichev see here and here.
We also know how to extract it from dbkdChkEventRdbmsErr (DB kernel debug check event of RDBMS error) thanks to Yong Huang see here.
But here the function is instrumented differently !
Test env : oracle 18c/OEL6/UEK4
Armed with Intel pin tools “debugtrace.so” and with the option “-instruction -memory” i started navigating the oracle code documentation :p
I found that many interesting stuffs are happening inside the functions “dbgfcsIlcsGetDefByName” and “dbgdChkEventIntV” ! And based on that i created a mapping file dbgdChkEventIntV_event_list.txt !
Without going into detail here is the findings :
Let’s analyze the function “dmltrace” (showing only what’s necessary :p ) :
We are interested here into two function arguments passed to dbgdChkEventIntV into edx and ecx registry. Basically if edx= 0x1160001 then we can activate this event using the trace event : Main event to control UTS tracing.
The value in ecx indicate which component to trace. in this case the component with id 0x2050049 ! which is :
That’s the one i used in my previous blog post !
Ok let’s try another one in function “qksqbRegister”
in this case edx=0x1160001 so we have to use the trace event ! Lets check which component in this case ecx=0x2050005 :
Ok let’s try another one in function “kslwtectx”
in this case edx=0x216000e
For that one we have to use the sql_trace event !
Another one !
in this case edx=0x2160002
And for this we have to use the wait_event !
This is not an exhaustive research and the mapping file is far from being complete but it may give some clue on where to start !
UPDATE 16/10/2018 : I updated the mapping file with more information
Download : dbgdChkEventIntV_event_list.txt
That’s it 😀