SlideShare a Scribd company logo
1 of 35
©2013	
  Enkitec	
  
Mini	
  session	
  
Se2ng	
  up	
  and	
  using	
  gdb	
  for	
  profiling
Frits	
  Hoogland	
  
Collaborate	
  2014,	
  Las	
  Vegas
1
This is the font size used for showing screen output. Be sure this is readable for you.
`whoami`
• Frits	
  Hoogland	
  
• Working	
  with	
  Oracle	
  products	
  since	
  1996	
  
!
• Blog:	
  hLp://fritshoogland.wordpress.com	
  
• TwiLer:	
  @fritshoogland	
  
• Email:	
  frits.hoogland@enkitec.com	
  
• Oracle	
  ACE	
  Director	
  
• OakTable	
  Member
2
3
•  Early&bird&discount&expires&April&15,&2014.
•  Quick links:
–  Home: www.enkitec.com/e4
–  Registration: http://www.enkitec.com/e4/register
–  Location: http://www.enkitec.com/e4/location
–  Training Days Following E4:
http://www.enkitec.com/e4/training-days
Goals	
  &	
  prerequisites	
  
• Goal:	
  give	
  a	
  primer	
  on	
  using	
  gdb	
  for	
  profiling	
  C	
  
funcXon	
  sequences.	
  This	
  is	
  by	
  no	
  means	
  a	
  
comprehensive,	
  full	
  explanaXon.	
  
!
• Prerequisites:	
  
– Understanding	
  of	
  (internal)	
  execuXon	
  of	
  C	
  programs.	
  
– Understanding	
  of	
  Oracle	
  tracing	
  mechanisms.
4
Use	
  the	
  correct	
  tool!
• In	
  order	
  to	
  troubleshoot	
  performance	
  problems	
  
or	
  unexpected	
  behaviour,	
  sql_trace	
  at	
  level	
  8	
  is	
  a	
  
decent	
  starXng	
  point.	
  
!
• sql_trace,	
  level	
  8	
  
• system	
  calls:	
  strace	
  (combined	
  with	
  sql_trace)	
  
• funcXon	
  calls:	
  gdb	
  
!
• This	
  means	
  using	
  gdb	
  is	
  no	
  “one	
  size	
  fits	
  all”	
  res.
5
Scope
• gdb	
  is	
  the	
  GNU	
  debugger.	
  
• Installed	
  by	
  default	
  on	
  at	
  least	
  OL	
  &	
  RHEL.	
  
!
• Not	
  a	
  dependency	
  of	
  the	
  Oracle	
  database.	
  
!
• This	
  means	
  it’s	
  installed	
  on	
  most	
  systems!
6
Scope
• gdb	
  is	
  meant	
  for	
  debugging	
  C	
  programs.	
  
!
• in	
  order	
  to	
  do	
  so,	
  the	
  ‘-­‐g’	
  flag	
  must	
  be	
  added	
  
when	
  compiling	
  the	
  program	
  (gcc).	
  
– The	
  ‘-­‐g’	
  flag	
  adds	
  debug	
  info	
  to	
  the	
  executable.	
  
!
• The	
  oracle	
  database	
  executables	
  do	
  NOT	
  contain	
  
this	
  info!
7
Scope
• Normal	
  usage	
  of	
  gdb	
  is	
  to	
  start	
  gdb	
  with	
  the	
  
executable	
  to	
  be	
  debugged:	
  
– gdb	
  mycompiledprogram	
  
!
• This	
  can	
  not	
  be	
  done	
  with	
  the	
  oracle	
  database.
8
Symbol	
  table
• The	
  Oracle	
  executable	
  is	
  dynamically	
  linked:	
  
!
$ ldd oracle
linux-vdso.so.1 => (0x00007fff1dbff000)
libodm11.so => /u01/app/oracle/product/11.2.0.1/dbhome_1/lib/libodm11.so (0x00..
libcell11.so => /u01/app/oracle/product/11.2.0.1/dbhome_1/lib/libcell11.so (0x..
libskgxp11.so => /u01/app/oracle/product/11.2.0.1/dbhome_1/lib/libskgxp11.so (..
librt.so.1 => /lib64/librt.so.1 (0x0000003f39600000)
libnnz11.so => /u01/app/oracle/product/11.2.0.1/dbhome_1/lib/libnnz11.so (0x0..
libclsra11.so => /u01/app/oracle/product/11.2.0.1/dbhome_1/lib/libclsra11.so (..
...
9
Symbol	
  table
• A	
  DL	
  executable	
  does	
  not	
  know	
  the	
  code	
  
locaXon	
  of	
  a	
  funcXon	
  in	
  a	
  library	
  upfront.	
  
– Think	
  new	
  version	
  of	
  library,	
  3rd	
  party,	
  etc.	
  
!
• In	
  order	
  to	
  find	
  these	
  funcXons,	
  there’s	
  a	
  table	
  of	
  
funcXon	
  to	
  code-­‐locaXon.
10
Symbol	
  table
• The	
  symbol	
  table	
  can	
  be	
  shown	
  with	
  the	
  ‘nm’	
  
command.	
  
!
$ nm oracle | grep kcbgtcr
00000000082c8bca T kcbgtcr
0000000003ed68a2 T kcbgtcrf
!
!
• gdb	
  can	
  use	
  the	
  symbol	
  table	
  to	
  understand	
  in	
  
which	
  funcXon	
  execuXon	
  is	
  taking	
  place.
11
Using	
  gdb	
  on	
  processes
• gdb	
  can	
  aLach	
  to	
  (running)	
  processes	
  using:	
  
gdb	
  -­‐p	
  <PID>	
  
!
• This	
  will	
  suspend	
  execuXon	
  of	
  that	
  process	
  (!!)	
  
!
• Mind	
  the	
  absence	
  of	
  ‘oracle’;	
  this	
  is	
  not	
  oracle	
  
specific.
12
Warning
• gdb	
  allows	
  you	
  to	
  do	
  specific	
  things.	
  
• If	
  you	
  want	
  to	
  know	
  where	
  oracle	
  spend	
  its	
  Xme:	
  
– Use	
  10046/sql_trace	
  at	
  level	
  8.	
  
• If	
  you	
  want	
  to	
  know	
  what	
  logical	
  steps	
  oracle	
  
executed:	
  
– Use	
  an	
  execuXon	
  plan.	
  
• If	
  you	
  want	
  to	
  look	
  at	
  system	
  calls	
  (I/O!):	
  
– Use	
  strace	
  (*although	
  it	
  can	
  leave	
  out	
  informaXon)	
  
• If	
  you	
  want	
  to	
  look	
  at	
  C	
  funcXon	
  call	
  level:	
  
– Use	
  gdb. 13
using	
  gdb	
  on	
  oracle
• ALach	
  to	
  a	
  running	
  Oracle	
  process	
  (root!):	
  
# gdb -p 6615
GNU gdb (GDB) Red Hat Enterprise Linux (7.2-56.el6)
Copyright (C) 2010 Free Software Foundation, Inc.
...
Attaching to process 6615
Reading symbols from /u01/app/oracle/product/11.2.0.3/dbhome_1/bin/oracle...(no
debugging symbols found)...done.
Reading symbols from /u01/app/oracle/product/11.2.0.3/dbhome_1/lib/
libcell11.so...done.
Loaded symbols for /u01/app/oracle/product/11.2.0.3/dbhome_1/lib/libcell11.so
Loaded symbols for /u01/app/oracle/product/11.2.0.3/dbhome_1/lib/libnque11.so
0x0000003f38a0e530 in __read_nocancel () from /lib64/libpthread.so.0
Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.80.el6_3.6.x86_64
libaio-0.3.107-10.el6.x86_64 numactl-2.0.7-3.el6.x86_64
(gdb)
14
using	
  gdb	
  on	
  oracle
• The	
  database	
  session	
  is	
  stuck	
  now:	
  
$ sqlplus ts/ts@v11203
!
SQL*Plus: Release 11.2.0.3.0 Production on Mon Dec 9 15:51:05 2013
!
Copyright (c) 1982, 2011, Oracle. All rights reserved.
!
!
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Automatic Storage Management, OLAP, Data Mining
and Real Application Testing options
!
TS@v11203 >
TS@v11203 > select * from dual;
15
using	
  gdb	
  on	
  oracle
• Now	
  let	
  the	
  oracle	
  process	
  conXnue:	
  
!
(gdb) c
Continuing.
!
• ‘select	
  *	
  from	
  dual’	
  conXnues.	
  
– Please	
  mind	
  performance	
  is	
  much	
  lower	
  with	
  gdb	
  
aLached	
  to	
  a	
  process!	
  
!
• A	
  process	
  can	
  be	
  suspended	
  at	
  any	
  Xme	
  by	
  
pressing	
  CTRL+c	
  in	
  gdb.
16
• The	
  funcXonality	
  that	
  is	
  useful	
  for	
  profiling,	
  is	
  
using	
  the	
  ‘break’	
  funcXonality.	
  
!
• The	
  funcXon	
  of	
  break	
  is	
  to	
  ‘break’	
  execuXon	
  
when	
  a	
  certain	
  funcXon	
  is	
  entered.	
  
!
• Granularity	
  of	
  breaking	
  is	
  funcXon	
  call	
  level.
17
• Let’s	
  break	
  on	
  a	
  well	
  known	
  funcXon:	
  io_submit()	
  
^C
Program received signal SIGINT, Interrupt.
(gdb) break io_submit
Breakpoint 1 at 0x3f38200660
(gdb) c
Continuing.
18
• Issue	
  a	
  full	
  scan	
  (to	
  make	
  oracle	
  use	
  of	
  AIO):	
  
!
TS@v11203 > select count(*) from t2;
!
!
• This	
  will	
  trigger	
  AIO,	
  and	
  gdb	
  breaks	
  execuXon:	
  
!
(gdb) c
Continuing.
!
Breakpoint 1, 0x0000003f38200660 in io_submit () from /lib64/libaio.so.1
(gdb)
19
• So	
  we	
  now	
  we	
  know	
  the	
  Oracle	
  process	
  called	
  
‘io_submit()’.	
  	
  
!
• If	
  we	
  press	
  ‘c’	
  (conXnue),	
  the	
  process	
  conXnues.	
  
(gdb) c
Continuing.
!
Breakpoint 1, 0x0000003f38200660 in io_submit () from /lib64/libaio.so.1
(gdb)
!
• Another	
  encounter	
  of	
  ‘io_submit()’,	
  etc.
20
• The	
  conXnue	
  command	
  can	
  be	
  automated:	
  
(gdb) commands 1
Type commands for breakpoint(s) 1, one per line.
End with a line saying just "end".
>c
>end
(gdb) c
Continuing.
!
Breakpoint 1, 0x0000003f38200660 in io_submit () from /lib64/libaio.so.1
!
Breakpoint 1, 0x0000003f38200660 in io_submit () from /lib64/libaio.so.1
!
...
21
• Let’s	
  add	
  breaking	
  on	
  io_getevents()	
  too:	
  
^C
Program received signal SIGINT, Interrupt.
0x0000003f38a0e530 in __read_nocancel () from /lib64/libpthread.so.0
(gdb) break 'io_getevents@plt'
Breakpoint 2 at 0x3f382006a0
(gdb) commands
Type commands for breakpoint(s) 2, one per line.
End with a line saying just "end".
>c
>end
(gdb) c
Continuing.
22
• Issue	
  another	
  full	
  scan:	
  
TS@v11203 > select count(*) from t2;
• Now	
  we	
  see	
  the	
  AIO	
  calls	
  in	
  gdb:	
  
(gdb) c
Continuing.
Breakpoint 1, 0x0000003f38200660 in io_submit () from /lib64/libaio.so.1
!
Breakpoint 1, 0x0000003f38200660 in io_submit () from /lib64/libaio.so.1
!
Breakpoint 2, 0x0000000000a09030 in io_getevents@plt ()
!
Breakpoint 1, 0x0000003f38200660 in io_submit () from /lib64/libaio.so.1
!
Breakpoint 1, 0x0000003f38200660 in io_submit () from /lib64/libaio.so.1
!
Breakpoint 2, 0x0000000000a09030 in io_getevents@plt ()
23
• Wait!	
  Don’t	
  we	
  now	
  have	
  exactly	
  the	
  same	
  as	
  
strace,	
  but	
  in	
  a	
  very	
  difficult	
  way?	
  
!
# strace -e trace=io_submit,io_getevents -p 10430
Process 10430 attached - interrupt to quit
io_submit(140441218691072, 1, {{0x7fbb03109450, 0, 0, 0, 257}}) = 1
io_submit(140441218691072, 1, {{0x7fbb031091f8, 0, 0, 0, 257}}) = 1
io_getevents(140441218691072, 2, 128, {{0x7fbb03109450, 0x7fbb03109450, 106496, 0}},
{0, 0}) = 1
io_getevents(140441218691072, 1, 128, {{0x7fbb031091f8, 0x7fbb031091f8, 122880, 0}},
{0, 0}) = 1
io_submit(140441218691072, 1, {{0x7fbb03109450, 0, 0, 0, 257}}) = 1
io_getevents(140441218691072, 1, 128, {{0x7fbb03109450, 0x7fbb03109450, 122880, 0}},
{0, 0}) = 1
24
• Yes.	
  
• But	
  once	
  you	
  add	
  in	
  (oracle)	
  user	
  land	
  funcXons,	
  
the	
  advantage	
  becomes	
  clear:	
  
!
• kslwtbctx	
  ()	
  :	
  start	
  a	
  wait	
  event*	
  
• kslwtectx	
  ()	
  :	
  end	
  a	
  wait	
  event*	
  
!
*Oracle	
  11	
  and	
  up
25
• Add	
  these	
  funcXons	
  to	
  the	
  breaks:	
  
(gdb) break io_submit
Breakpoint 1 at 0x3f38200660
(gdb) break 'io_getevents@plt'
Breakpoint 2 at 0xa09030
(gdb) rbreak ^kslwt[be]ctx
Breakpoint 3 at 0x8f9a652
<function, no debug info> kslwtbctx;
Breakpoint 4 at 0x8fa1334
<function, no debug info> kslwtectx;
(gdb) commands 1-4
Type commands for breakpoint(s) 1-4, one per line.
End with a line saying just "end".
>c
>end
(gdb) c
Continuing.
26
• And	
  issue	
  the	
  scan	
  again,	
  gdb	
  now	
  shows:	
  
Breakpoint 1, 0x0000003f38200660 in io_submit () from /lib64/libaio.so.1
!
Breakpoint 1, 0x0000003f38200660 in io_submit () from /lib64/libaio.so.1
!
Breakpoint 2, 0x0000000000a09030 in io_getevents@plt ()
!
Breakpoint 2, 0x0000000000a09030 in io_getevents@plt ()
!
Breakpoint 2, 0x0000000000a09030 in io_getevents@plt ()
!
Breakpoint 2, 0x0000000000a09030 in io_getevents@plt ()
!
Breakpoint 3, 0x0000000008f9a652 in kslwtbctx ()
!
Breakpoint 2, 0x0000000000a09030 in io_getevents@plt ()
27
• Wait!	
  There’s	
  more!	
  
!
• The	
  Oracle	
  database	
  doesn’t	
  have/distribute	
  
debug	
  symbols.	
  
• But	
  Oracle	
  Linux	
  has!	
  
– These	
  are	
  called	
  the	
  ‘debuginfo’	
  packages!	
  
– Available	
  on	
  hLps://oss.oracle.com/ol6/debuginfo/	
  
– As	
  yum	
  repo	
  (!)
28
• Add	
  the	
  debuginfo	
  repository	
  to	
  your	
  yum	
  config:	
  
!
# vi /etc/yum.repos.d/debuginfo.repo
[ol6_debuginfo]
name=Oracle Linux 6 debuginfo
baseurl=http://oss.oracle.com/ol6/debuginfo
gpgkey=https://oss.oracle.com/ol6/RPM-GPG-KEY-oracle
gpgcheck=1
enabled=1
29
• Watch	
  what	
  gdb	
  tells	
  you	
  when	
  you	
  aLach	
  to	
  an	
  
oracle	
  process:	
  
!
Reading symbols from /u01/app/oracle/product/11.2.0.3/dbhome_1/lib/libnque11.so...
(no debugging symbols found)...done.
Loaded symbols for /u01/app/oracle/product/11.2.0.3/dbhome_1/lib/libnque11.so
0x0000003f38a0e530 in __read_nocancel () from /lib64/libpthread.so.0
Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.80.el6_3.6.x86_64
libaio-0.3.107-10.el6.x86_64 numactl-2.0.7-3.el6.x86_64
(gdb)
!
• This	
  leaves	
  the	
  impression	
  that	
  you	
  should	
  
execute	
  ‘debuginfo-­‐install’…	
  
30
• No!	
  That	
  actually	
  is	
  RH	
  specific	
  (AFAIK)	
  
• Use:	
  
# yum install glibc-debuginfo libaio-debuginfo numactl-debuginfo
!
• Sadly,	
  this	
  *might*	
  not	
  work…	
  
– Personal	
  experience	
  is	
  the	
  metadata	
  of	
  oss	
  repo	
  is	
  not	
  
kept	
  up	
  to	
  date	
  very	
  much…	
  
– It	
  will	
  install	
  the	
  latest	
  version	
  in	
  the	
  metadata.	
  
• If	
  it	
  doesn’t	
  work,	
  use	
  rpm	
  directly:	
  
# rpm -Uvh https://oss.oracle.com/ol6/debuginfo/glibc-debuginfo-
common-2.12-1.80.el6_3.6.x86_64.rpm
31
• Now	
  aLach	
  to	
  an	
  Oracle	
  session	
  again:	
  
!
0x0000003f38a0e530 in __read_nocancel () at ../sysdeps/unix/syscall-template.S:82
82 T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS)
(gdb)
!
• Look	
  what	
  io_submit	
  ()/io_getevents	
  ()	
  shows:	
  
(gdb) break io_submit
Breakpoint 1 at 0x3f38200660: file io_submit.c, line 23.
(gdb) break io_getevents_0_4
Breakpoint 2 at 0x3f38200620: file io_getevents.c, line 46.
(gdb) commands 1-2
Type commands for breakpoint(s) 1-2, one per line.
End with a line saying just "end".
>c
>end
(gdb) c
Continuing. 32
debuginfo:	
  funcXon	
  call	
  args
Breakpoint 1, io_submit (ctx=0x7fbb04f3a000, nr=1, iocbs=0x7fffcffce7a0) at
io_submit.c:23
23 io_syscall3(int, io_submit, io_submit, io_context_t, ctx, long, nr, struct iocb
**, iocbs)
!
Breakpoint 1, io_submit (ctx=0x7fbb04f3a000, nr=1, iocbs=0x7fffcffce7a0) at
io_submit.c:23
23 io_syscall3(int, io_submit, io_submit, io_context_t, ctx, long, nr, struct iocb
**, iocbs)
!
Breakpoint 2, io_getevents_0_4 (ctx=0x7fbb04f3a000, min_nr=2, nr=128,
events=0x7fffcffd6e08, timeout=0x7fffcffd7e10) at io_getevents.c:46
46 if (ring==NULL || ring->magic != AIO_RING_MAGIC)
!
Breakpoint 2, io_getevents_0_4 (ctx=0x7fbb04f3a000, min_nr=2, nr=128,
events=0x7fffcffd9ee8, timeout=0x7fffcffdaef0) at io_getevents.c:46
46 if (ring==NULL || ring->magic != AIO_RING_MAGIC)
!
Breakpoint 2, io_getevents_0_4 (ctx=0x7fbb04f3a000, min_nr=2, nr=128,
events=0x7fffcffd6c08, timeout=0x7fffcffd7c10) at io_getevents.c:46
46 if (ring==NULL || ring->magic != AIO_RING_MAGIC)
33
• Other	
  useful	
  gdb	
  commands:	
  
– info	
  break	
  
– save	
  breakpoints	
  <yourfilename>	
  
– source	
  <yourfilename>	
  
– disable	
  <breaknr>	
  
– enable	
  <breaknr>	
  
– set	
  paginaXon	
  off	
  
– q	
  
– ~/.gdbinit	
  
– bt
34
!
!
!
QuesXons?
35

More Related Content

What's hot

Introduction to MySQL Query Tuning for Dev[Op]s
Introduction to MySQL Query Tuning for Dev[Op]sIntroduction to MySQL Query Tuning for Dev[Op]s
Introduction to MySQL Query Tuning for Dev[Op]sSveta Smirnova
 
Drilling Deep Into Exadata Performance
Drilling Deep Into Exadata PerformanceDrilling Deep Into Exadata Performance
Drilling Deep Into Exadata PerformanceEnkitec
 
MySQL Performance Schema in 20 Minutes
 MySQL Performance Schema in 20 Minutes MySQL Performance Schema in 20 Minutes
MySQL Performance Schema in 20 MinutesSveta Smirnova
 
Introduction into MySQL Query Tuning
Introduction into MySQL Query TuningIntroduction into MySQL Query Tuning
Introduction into MySQL Query TuningSveta Smirnova
 
MySQL Performance Schema in Action
MySQL Performance Schema in ActionMySQL Performance Schema in Action
MySQL Performance Schema in ActionSveta Smirnova
 
Oracle sql high performance tuning
Oracle sql high performance tuningOracle sql high performance tuning
Oracle sql high performance tuningGuy Harrison
 
Performance Schema in Action: demo
Performance Schema in Action: demoPerformance Schema in Action: demo
Performance Schema in Action: demoSveta Smirnova
 
Performance Schema for MySQL troubleshooting
Performance Schema for MySQL troubleshootingPerformance Schema for MySQL troubleshooting
Performance Schema for MySQL troubleshootingSveta Smirnova
 
Tuning SQL for Oracle Exadata: The Good, The Bad, and The Ugly Tuning SQL fo...
 Tuning SQL for Oracle Exadata: The Good, The Bad, and The Ugly Tuning SQL fo... Tuning SQL for Oracle Exadata: The Good, The Bad, and The Ugly Tuning SQL fo...
Tuning SQL for Oracle Exadata: The Good, The Bad, and The Ugly Tuning SQL fo...Enkitec
 
Tanel Poder - Scripts and Tools short
Tanel Poder - Scripts and Tools shortTanel Poder - Scripts and Tools short
Tanel Poder - Scripts and Tools shortTanel Poder
 
DBA Commands and Concepts That Every Developer Should Know
DBA Commands and Concepts That Every Developer Should KnowDBA Commands and Concepts That Every Developer Should Know
DBA Commands and Concepts That Every Developer Should KnowAlex Zaballa
 
In Memory Database In Action by Tanel Poder and Kerry Osborne
In Memory Database In Action by Tanel Poder and Kerry OsborneIn Memory Database In Action by Tanel Poder and Kerry Osborne
In Memory Database In Action by Tanel Poder and Kerry OsborneEnkitec
 
Oracle Database 12.1.0.2 New Features
Oracle Database 12.1.0.2 New FeaturesOracle Database 12.1.0.2 New Features
Oracle Database 12.1.0.2 New FeaturesAlex Zaballa
 
DBA Commands and Concepts That Every Developer Should Know - Part 2
DBA Commands and Concepts That Every Developer Should Know - Part 2DBA Commands and Concepts That Every Developer Should Know - Part 2
DBA Commands and Concepts That Every Developer Should Know - Part 2Alex Zaballa
 
How to migrate from MySQL to MariaDB without tears
How to migrate from MySQL to MariaDB without tearsHow to migrate from MySQL to MariaDB without tears
How to migrate from MySQL to MariaDB without tearsSveta Smirnova
 
Ukoug15 SIMD outside and inside Oracle 12c (12.1.0.2)
Ukoug15 SIMD outside and inside Oracle 12c (12.1.0.2)Ukoug15 SIMD outside and inside Oracle 12c (12.1.0.2)
Ukoug15 SIMD outside and inside Oracle 12c (12.1.0.2)Laurent Leturgez
 
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should KnowDBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should KnowAlex Zaballa
 
Oracle Database 12c Release 2 - New Features On Oracle Database Exadata Expre...
Oracle Database 12c Release 2 - New Features On Oracle Database Exadata Expre...Oracle Database 12c Release 2 - New Features On Oracle Database Exadata Expre...
Oracle Database 12c Release 2 - New Features On Oracle Database Exadata Expre...Alex Zaballa
 

What's hot (19)

Introduction to MySQL Query Tuning for Dev[Op]s
Introduction to MySQL Query Tuning for Dev[Op]sIntroduction to MySQL Query Tuning for Dev[Op]s
Introduction to MySQL Query Tuning for Dev[Op]s
 
Drilling Deep Into Exadata Performance
Drilling Deep Into Exadata PerformanceDrilling Deep Into Exadata Performance
Drilling Deep Into Exadata Performance
 
MySQL Performance Schema in 20 Minutes
 MySQL Performance Schema in 20 Minutes MySQL Performance Schema in 20 Minutes
MySQL Performance Schema in 20 Minutes
 
Introduction into MySQL Query Tuning
Introduction into MySQL Query TuningIntroduction into MySQL Query Tuning
Introduction into MySQL Query Tuning
 
MySQL Performance Schema in Action
MySQL Performance Schema in ActionMySQL Performance Schema in Action
MySQL Performance Schema in Action
 
Oracle sql high performance tuning
Oracle sql high performance tuningOracle sql high performance tuning
Oracle sql high performance tuning
 
Performance Schema in Action: demo
Performance Schema in Action: demoPerformance Schema in Action: demo
Performance Schema in Action: demo
 
Performance Schema for MySQL troubleshooting
Performance Schema for MySQL troubleshootingPerformance Schema for MySQL troubleshooting
Performance Schema for MySQL troubleshooting
 
Tuning SQL for Oracle Exadata: The Good, The Bad, and The Ugly Tuning SQL fo...
 Tuning SQL for Oracle Exadata: The Good, The Bad, and The Ugly Tuning SQL fo... Tuning SQL for Oracle Exadata: The Good, The Bad, and The Ugly Tuning SQL fo...
Tuning SQL for Oracle Exadata: The Good, The Bad, and The Ugly Tuning SQL fo...
 
Tanel Poder - Scripts and Tools short
Tanel Poder - Scripts and Tools shortTanel Poder - Scripts and Tools short
Tanel Poder - Scripts and Tools short
 
DBA Commands and Concepts That Every Developer Should Know
DBA Commands and Concepts That Every Developer Should KnowDBA Commands and Concepts That Every Developer Should Know
DBA Commands and Concepts That Every Developer Should Know
 
In Memory Database In Action by Tanel Poder and Kerry Osborne
In Memory Database In Action by Tanel Poder and Kerry OsborneIn Memory Database In Action by Tanel Poder and Kerry Osborne
In Memory Database In Action by Tanel Poder and Kerry Osborne
 
Oracle Database 12.1.0.2 New Features
Oracle Database 12.1.0.2 New FeaturesOracle Database 12.1.0.2 New Features
Oracle Database 12.1.0.2 New Features
 
DBA Commands and Concepts That Every Developer Should Know - Part 2
DBA Commands and Concepts That Every Developer Should Know - Part 2DBA Commands and Concepts That Every Developer Should Know - Part 2
DBA Commands and Concepts That Every Developer Should Know - Part 2
 
How to migrate from MySQL to MariaDB without tears
How to migrate from MySQL to MariaDB without tearsHow to migrate from MySQL to MariaDB without tears
How to migrate from MySQL to MariaDB without tears
 
Ukoug15 SIMD outside and inside Oracle 12c (12.1.0.2)
Ukoug15 SIMD outside and inside Oracle 12c (12.1.0.2)Ukoug15 SIMD outside and inside Oracle 12c (12.1.0.2)
Ukoug15 SIMD outside and inside Oracle 12c (12.1.0.2)
 
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should KnowDBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
DBA Brasil 1.0 - DBA Commands and Concepts That Every Developer Should Know
 
Oracle SQL Tuning
Oracle SQL TuningOracle SQL Tuning
Oracle SQL Tuning
 
Oracle Database 12c Release 2 - New Features On Oracle Database Exadata Expre...
Oracle Database 12c Release 2 - New Features On Oracle Database Exadata Expre...Oracle Database 12c Release 2 - New Features On Oracle Database Exadata Expre...
Oracle Database 12c Release 2 - New Features On Oracle Database Exadata Expre...
 

Viewers also liked

Due Diligence with Exadata
Due Diligence with ExadataDue Diligence with Exadata
Due Diligence with ExadataEnkitec
 
Oracle Performance Tools of the Trade
Oracle Performance Tools of the TradeOracle Performance Tools of the Trade
Oracle Performance Tools of the TradeEnkitec
 
APEX Security Primer
APEX Security PrimerAPEX Security Primer
APEX Security PrimerEnkitec
 
Introducing the eDB360 Tool
Introducing the eDB360 ToolIntroducing the eDB360 Tool
Introducing the eDB360 ToolCarlos Sierra
 
OGG Architecture Performance
OGG Architecture PerformanceOGG Architecture Performance
OGG Architecture PerformanceEnkitec
 
SQLT XPLORE: The SQLT XPLAIN hidden child
SQLT XPLORE: The SQLT XPLAIN hidden childSQLT XPLORE: The SQLT XPLAIN hidden child
SQLT XPLORE: The SQLT XPLAIN hidden childCarlos Sierra
 
SQL Tuning made easier with SQLTXPLAIN (SQLT)
SQL Tuning made easier with SQLTXPLAIN (SQLT)SQL Tuning made easier with SQLTXPLAIN (SQLT)
SQL Tuning made easier with SQLTXPLAIN (SQLT)Carlos Sierra
 
Engineered Systems: Environment-as-a-Service Demonstration
Engineered Systems: Environment-as-a-Service DemonstrationEngineered Systems: Environment-as-a-Service Demonstration
Engineered Systems: Environment-as-a-Service DemonstrationEnkitec
 
Understanding How is that Adaptive Cursor Sharing (ACS) produces multiple Opt...
Understanding How is that Adaptive Cursor Sharing (ACS) produces multiple Opt...Understanding How is that Adaptive Cursor Sharing (ACS) produces multiple Opt...
Understanding How is that Adaptive Cursor Sharing (ACS) produces multiple Opt...Carlos Sierra
 
Using Angular JS in APEX
Using Angular JS in APEXUsing Angular JS in APEX
Using Angular JS in APEXEnkitec
 
Using SQL Plan Management (SPM) to balance Plan Flexibility and Plan Stability
Using SQL Plan Management (SPM) to balance Plan Flexibility and Plan StabilityUsing SQL Plan Management (SPM) to balance Plan Flexibility and Plan Stability
Using SQL Plan Management (SPM) to balance Plan Flexibility and Plan StabilityCarlos Sierra
 
How a Developer can Troubleshoot a SQL performing poorly on a Production DB
How a Developer can Troubleshoot a SQL performing poorly on a Production DBHow a Developer can Troubleshoot a SQL performing poorly on a Production DB
How a Developer can Troubleshoot a SQL performing poorly on a Production DBCarlos Sierra
 
Introducing the eDB360 Tool
Introducing the eDB360 ToolIntroducing the eDB360 Tool
Introducing the eDB360 ToolCarlos Sierra
 
Oracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsOracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsCarlos Sierra
 
Oracle Performance Tools of the Trade
Oracle Performance Tools of the TradeOracle Performance Tools of the Trade
Oracle Performance Tools of the TradeCarlos Sierra
 

Viewers also liked (15)

Due Diligence with Exadata
Due Diligence with ExadataDue Diligence with Exadata
Due Diligence with Exadata
 
Oracle Performance Tools of the Trade
Oracle Performance Tools of the TradeOracle Performance Tools of the Trade
Oracle Performance Tools of the Trade
 
APEX Security Primer
APEX Security PrimerAPEX Security Primer
APEX Security Primer
 
Introducing the eDB360 Tool
Introducing the eDB360 ToolIntroducing the eDB360 Tool
Introducing the eDB360 Tool
 
OGG Architecture Performance
OGG Architecture PerformanceOGG Architecture Performance
OGG Architecture Performance
 
SQLT XPLORE: The SQLT XPLAIN hidden child
SQLT XPLORE: The SQLT XPLAIN hidden childSQLT XPLORE: The SQLT XPLAIN hidden child
SQLT XPLORE: The SQLT XPLAIN hidden child
 
SQL Tuning made easier with SQLTXPLAIN (SQLT)
SQL Tuning made easier with SQLTXPLAIN (SQLT)SQL Tuning made easier with SQLTXPLAIN (SQLT)
SQL Tuning made easier with SQLTXPLAIN (SQLT)
 
Engineered Systems: Environment-as-a-Service Demonstration
Engineered Systems: Environment-as-a-Service DemonstrationEngineered Systems: Environment-as-a-Service Demonstration
Engineered Systems: Environment-as-a-Service Demonstration
 
Understanding How is that Adaptive Cursor Sharing (ACS) produces multiple Opt...
Understanding How is that Adaptive Cursor Sharing (ACS) produces multiple Opt...Understanding How is that Adaptive Cursor Sharing (ACS) produces multiple Opt...
Understanding How is that Adaptive Cursor Sharing (ACS) produces multiple Opt...
 
Using Angular JS in APEX
Using Angular JS in APEXUsing Angular JS in APEX
Using Angular JS in APEX
 
Using SQL Plan Management (SPM) to balance Plan Flexibility and Plan Stability
Using SQL Plan Management (SPM) to balance Plan Flexibility and Plan StabilityUsing SQL Plan Management (SPM) to balance Plan Flexibility and Plan Stability
Using SQL Plan Management (SPM) to balance Plan Flexibility and Plan Stability
 
How a Developer can Troubleshoot a SQL performing poorly on a Production DB
How a Developer can Troubleshoot a SQL performing poorly on a Production DBHow a Developer can Troubleshoot a SQL performing poorly on a Production DB
How a Developer can Troubleshoot a SQL performing poorly on a Production DB
 
Introducing the eDB360 Tool
Introducing the eDB360 ToolIntroducing the eDB360 Tool
Introducing the eDB360 Tool
 
Oracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsOracle Performance Tuning Fundamentals
Oracle Performance Tuning Fundamentals
 
Oracle Performance Tools of the Trade
Oracle Performance Tools of the TradeOracle Performance Tools of the Trade
Oracle Performance Tools of the Trade
 

Similar to Mini Session - Using GDB for Profiling

Crash_Report_Mechanism_In_Tizen
Crash_Report_Mechanism_In_TizenCrash_Report_Mechanism_In_Tizen
Crash_Report_Mechanism_In_TizenLex Yu
 
HKG15-211: Advanced Toolchain Usage Part 4
HKG15-211: Advanced Toolchain Usage Part 4HKG15-211: Advanced Toolchain Usage Part 4
HKG15-211: Advanced Toolchain Usage Part 4Linaro
 
HKG15-207: Advanced Toolchain Usage Part 3
HKG15-207: Advanced Toolchain Usage Part 3HKG15-207: Advanced Toolchain Usage Part 3
HKG15-207: Advanced Toolchain Usage Part 3Linaro
 
No instrumentation Golang Logging with eBPF (GoSF talk 11/11/20)
No instrumentation Golang Logging with eBPF (GoSF talk 11/11/20)No instrumentation Golang Logging with eBPF (GoSF talk 11/11/20)
No instrumentation Golang Logging with eBPF (GoSF talk 11/11/20)Pixie Labs
 
No instrumentation Golang Logging with eBPF (GoSF talk 11/11/20)
No instrumentation Golang Logging with eBPF (GoSF talk 11/11/20)No instrumentation Golang Logging with eBPF (GoSF talk 11/11/20)
No instrumentation Golang Logging with eBPF (GoSF talk 11/11/20)Zain Asgar
 
2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)
2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)
2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)JiandSon
 
Cisco IOS shellcode: All-in-one
Cisco IOS shellcode: All-in-oneCisco IOS shellcode: All-in-one
Cisco IOS shellcode: All-in-oneDefconRussia
 
Fn project quick installation guide
Fn project quick installation guideFn project quick installation guide
Fn project quick installation guideJohan Louwers
 
The true story_of_hello_world
The true story_of_hello_worldThe true story_of_hello_world
The true story_of_hello_worldfantasy zheng
 
Building static libraries for iOS with CocoaPods
Building static libraries for iOS with CocoaPodsBuilding static libraries for iOS with CocoaPods
Building static libraries for iOS with CocoaPodsSigmapoint
 
Embedded Graphics Drivers in Mesa (ELCE 2019)
Embedded Graphics Drivers in Mesa (ELCE 2019)Embedded Graphics Drivers in Mesa (ELCE 2019)
Embedded Graphics Drivers in Mesa (ELCE 2019)Igalia
 
Experiences with Oracle SPARC S7-2 Server
Experiences with Oracle SPARC S7-2 ServerExperiences with Oracle SPARC S7-2 Server
Experiences with Oracle SPARC S7-2 ServerJomaSoft
 
Run Run Trema Test
Run Run Trema TestRun Run Trema Test
Run Run Trema TestHiroshi Ota
 
[db tech showcase Tokyo 2017] A11: SQLite - The most used yet least appreciat...
[db tech showcase Tokyo 2017] A11: SQLite - The most used yet least appreciat...[db tech showcase Tokyo 2017] A11: SQLite - The most used yet least appreciat...
[db tech showcase Tokyo 2017] A11: SQLite - The most used yet least appreciat...Insight Technology, Inc.
 
Adding a BOLT pass
Adding a BOLT passAdding a BOLT pass
Adding a BOLT passAmir42407
 
Share the Experience of Using Embedded Development Board
Share the Experience of Using Embedded Development BoardShare the Experience of Using Embedded Development Board
Share the Experience of Using Embedded Development BoardJian-Hong Pan
 
Hardwear.io 2018 BLE Security Essentials workshop
Hardwear.io 2018 BLE Security Essentials workshopHardwear.io 2018 BLE Security Essentials workshop
Hardwear.io 2018 BLE Security Essentials workshopSlawomir Jasek
 
Enterprise manager cloud control 12c(12.1) &agent安装图文指南
Enterprise manager cloud control 12c(12.1) &agent安装图文指南Enterprise manager cloud control 12c(12.1) &agent安装图文指南
Enterprise manager cloud control 12c(12.1) &agent安装图文指南maclean liu
 
Road to sbt 1.0: Paved with server (2015 Amsterdam)
Road to sbt 1.0: Paved with server (2015 Amsterdam)Road to sbt 1.0: Paved with server (2015 Amsterdam)
Road to sbt 1.0: Paved with server (2015 Amsterdam)Eugene Yokota
 

Similar to Mini Session - Using GDB for Profiling (20)

Crash_Report_Mechanism_In_Tizen
Crash_Report_Mechanism_In_TizenCrash_Report_Mechanism_In_Tizen
Crash_Report_Mechanism_In_Tizen
 
HKG15-211: Advanced Toolchain Usage Part 4
HKG15-211: Advanced Toolchain Usage Part 4HKG15-211: Advanced Toolchain Usage Part 4
HKG15-211: Advanced Toolchain Usage Part 4
 
HKG15-207: Advanced Toolchain Usage Part 3
HKG15-207: Advanced Toolchain Usage Part 3HKG15-207: Advanced Toolchain Usage Part 3
HKG15-207: Advanced Toolchain Usage Part 3
 
No instrumentation Golang Logging with eBPF (GoSF talk 11/11/20)
No instrumentation Golang Logging with eBPF (GoSF talk 11/11/20)No instrumentation Golang Logging with eBPF (GoSF talk 11/11/20)
No instrumentation Golang Logging with eBPF (GoSF talk 11/11/20)
 
No instrumentation Golang Logging with eBPF (GoSF talk 11/11/20)
No instrumentation Golang Logging with eBPF (GoSF talk 11/11/20)No instrumentation Golang Logging with eBPF (GoSF talk 11/11/20)
No instrumentation Golang Logging with eBPF (GoSF talk 11/11/20)
 
2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)
2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)
2013.02.02 지앤선 테크니컬 세미나 - Xcode를 활용한 디버깅 팁(OSXDEV)
 
Cisco IOS shellcode: All-in-one
Cisco IOS shellcode: All-in-oneCisco IOS shellcode: All-in-one
Cisco IOS shellcode: All-in-one
 
Fn project quick installation guide
Fn project quick installation guideFn project quick installation guide
Fn project quick installation guide
 
The true story_of_hello_world
The true story_of_hello_worldThe true story_of_hello_world
The true story_of_hello_world
 
Building static libraries for iOS with CocoaPods
Building static libraries for iOS with CocoaPodsBuilding static libraries for iOS with CocoaPods
Building static libraries for iOS with CocoaPods
 
Embedded Graphics Drivers in Mesa (ELCE 2019)
Embedded Graphics Drivers in Mesa (ELCE 2019)Embedded Graphics Drivers in Mesa (ELCE 2019)
Embedded Graphics Drivers in Mesa (ELCE 2019)
 
Experiences with Oracle SPARC S7-2 Server
Experiences with Oracle SPARC S7-2 ServerExperiences with Oracle SPARC S7-2 Server
Experiences with Oracle SPARC S7-2 Server
 
Run Run Trema Test
Run Run Trema TestRun Run Trema Test
Run Run Trema Test
 
[db tech showcase Tokyo 2017] A11: SQLite - The most used yet least appreciat...
[db tech showcase Tokyo 2017] A11: SQLite - The most used yet least appreciat...[db tech showcase Tokyo 2017] A11: SQLite - The most used yet least appreciat...
[db tech showcase Tokyo 2017] A11: SQLite - The most used yet least appreciat...
 
Adding a BOLT pass
Adding a BOLT passAdding a BOLT pass
Adding a BOLT pass
 
Share the Experience of Using Embedded Development Board
Share the Experience of Using Embedded Development BoardShare the Experience of Using Embedded Development Board
Share the Experience of Using Embedded Development Board
 
Hardwear.io 2018 BLE Security Essentials workshop
Hardwear.io 2018 BLE Security Essentials workshopHardwear.io 2018 BLE Security Essentials workshop
Hardwear.io 2018 BLE Security Essentials workshop
 
Enterprise manager cloud control 12c(12.1) &agent安装图文指南
Enterprise manager cloud control 12c(12.1) &agent安装图文指南Enterprise manager cloud control 12c(12.1) &agent安装图文指南
Enterprise manager cloud control 12c(12.1) &agent安装图文指南
 
Securefile LOBs
Securefile LOBsSecurefile LOBs
Securefile LOBs
 
Road to sbt 1.0: Paved with server (2015 Amsterdam)
Road to sbt 1.0: Paved with server (2015 Amsterdam)Road to sbt 1.0: Paved with server (2015 Amsterdam)
Road to sbt 1.0: Paved with server (2015 Amsterdam)
 

More from Enkitec

Oracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsOracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsEnkitec
 
SQL Tuning Tools of the Trade
SQL Tuning Tools of the TradeSQL Tuning Tools of the Trade
SQL Tuning Tools of the TradeEnkitec
 
Using SQL Plan Management (SPM) to Balance Plan Flexibility and Plan Stability
Using SQL Plan Management (SPM) to Balance Plan Flexibility and Plan StabilityUsing SQL Plan Management (SPM) to Balance Plan Flexibility and Plan Stability
Using SQL Plan Management (SPM) to Balance Plan Flexibility and Plan StabilityEnkitec
 
Oracle GoldenGate Architecture Performance
Oracle GoldenGate Architecture PerformanceOracle GoldenGate Architecture Performance
Oracle GoldenGate Architecture PerformanceEnkitec
 
How Many Ways Can I Manage Oracle GoldenGate?
How Many Ways Can I Manage Oracle GoldenGate?How Many Ways Can I Manage Oracle GoldenGate?
How Many Ways Can I Manage Oracle GoldenGate?Enkitec
 
Understanding how is that adaptive cursor sharing (acs) produces multiple opt...
Understanding how is that adaptive cursor sharing (acs) produces multiple opt...Understanding how is that adaptive cursor sharing (acs) produces multiple opt...
Understanding how is that adaptive cursor sharing (acs) produces multiple opt...Enkitec
 
Sql tuning made easier with sqltxplain (sqlt)
Sql tuning made easier with sqltxplain (sqlt)Sql tuning made easier with sqltxplain (sqlt)
Sql tuning made easier with sqltxplain (sqlt)Enkitec
 
Profiling the logwriter and database writer
Profiling the logwriter and database writerProfiling the logwriter and database writer
Profiling the logwriter and database writerEnkitec
 
Fatkulin hotsos 2014
Fatkulin hotsos 2014Fatkulin hotsos 2014
Fatkulin hotsos 2014Enkitec
 
Combining ACS Flexibility with SPM Stability
Combining ACS Flexibility with SPM StabilityCombining ACS Flexibility with SPM Stability
Combining ACS Flexibility with SPM StabilityEnkitec
 
Why You May Not Need Offloading
Why You May Not Need OffloadingWhy You May Not Need Offloading
Why You May Not Need OffloadingEnkitec
 
LOBS, BLOBS, CLOBS: Dealing with Attachments in APEX
LOBS, BLOBS, CLOBS: Dealing with Attachments in APEXLOBS, BLOBS, CLOBS: Dealing with Attachments in APEX
LOBS, BLOBS, CLOBS: Dealing with Attachments in APEXEnkitec
 
Creating a Business Oriented UI in APEX
Creating a Business Oriented UI in APEXCreating a Business Oriented UI in APEX
Creating a Business Oriented UI in APEXEnkitec
 
Colvin RMAN New Features
Colvin RMAN New FeaturesColvin RMAN New Features
Colvin RMAN New FeaturesEnkitec
 
Enkitec Exadata Human Factor
Enkitec Exadata Human FactorEnkitec Exadata Human Factor
Enkitec Exadata Human FactorEnkitec
 
About Multiblock Reads v4
About Multiblock Reads v4About Multiblock Reads v4
About Multiblock Reads v4Enkitec
 
Performance data visualization with r and tableau
Performance data visualization with r and tableauPerformance data visualization with r and tableau
Performance data visualization with r and tableauEnkitec
 
Epic Clarity Running on Exadata
Epic Clarity Running on ExadataEpic Clarity Running on Exadata
Epic Clarity Running on ExadataEnkitec
 
Sql tuning tools of the trade
Sql tuning tools of the tradeSql tuning tools of the trade
Sql tuning tools of the tradeEnkitec
 
SQLT XPLORE - The SQLT XPLAIN Hidden Child
SQLT XPLORE -  The SQLT XPLAIN Hidden ChildSQLT XPLORE -  The SQLT XPLAIN Hidden Child
SQLT XPLORE - The SQLT XPLAIN Hidden ChildEnkitec
 

More from Enkitec (20)

Oracle Performance Tuning Fundamentals
Oracle Performance Tuning FundamentalsOracle Performance Tuning Fundamentals
Oracle Performance Tuning Fundamentals
 
SQL Tuning Tools of the Trade
SQL Tuning Tools of the TradeSQL Tuning Tools of the Trade
SQL Tuning Tools of the Trade
 
Using SQL Plan Management (SPM) to Balance Plan Flexibility and Plan Stability
Using SQL Plan Management (SPM) to Balance Plan Flexibility and Plan StabilityUsing SQL Plan Management (SPM) to Balance Plan Flexibility and Plan Stability
Using SQL Plan Management (SPM) to Balance Plan Flexibility and Plan Stability
 
Oracle GoldenGate Architecture Performance
Oracle GoldenGate Architecture PerformanceOracle GoldenGate Architecture Performance
Oracle GoldenGate Architecture Performance
 
How Many Ways Can I Manage Oracle GoldenGate?
How Many Ways Can I Manage Oracle GoldenGate?How Many Ways Can I Manage Oracle GoldenGate?
How Many Ways Can I Manage Oracle GoldenGate?
 
Understanding how is that adaptive cursor sharing (acs) produces multiple opt...
Understanding how is that adaptive cursor sharing (acs) produces multiple opt...Understanding how is that adaptive cursor sharing (acs) produces multiple opt...
Understanding how is that adaptive cursor sharing (acs) produces multiple opt...
 
Sql tuning made easier with sqltxplain (sqlt)
Sql tuning made easier with sqltxplain (sqlt)Sql tuning made easier with sqltxplain (sqlt)
Sql tuning made easier with sqltxplain (sqlt)
 
Profiling the logwriter and database writer
Profiling the logwriter and database writerProfiling the logwriter and database writer
Profiling the logwriter and database writer
 
Fatkulin hotsos 2014
Fatkulin hotsos 2014Fatkulin hotsos 2014
Fatkulin hotsos 2014
 
Combining ACS Flexibility with SPM Stability
Combining ACS Flexibility with SPM StabilityCombining ACS Flexibility with SPM Stability
Combining ACS Flexibility with SPM Stability
 
Why You May Not Need Offloading
Why You May Not Need OffloadingWhy You May Not Need Offloading
Why You May Not Need Offloading
 
LOBS, BLOBS, CLOBS: Dealing with Attachments in APEX
LOBS, BLOBS, CLOBS: Dealing with Attachments in APEXLOBS, BLOBS, CLOBS: Dealing with Attachments in APEX
LOBS, BLOBS, CLOBS: Dealing with Attachments in APEX
 
Creating a Business Oriented UI in APEX
Creating a Business Oriented UI in APEXCreating a Business Oriented UI in APEX
Creating a Business Oriented UI in APEX
 
Colvin RMAN New Features
Colvin RMAN New FeaturesColvin RMAN New Features
Colvin RMAN New Features
 
Enkitec Exadata Human Factor
Enkitec Exadata Human FactorEnkitec Exadata Human Factor
Enkitec Exadata Human Factor
 
About Multiblock Reads v4
About Multiblock Reads v4About Multiblock Reads v4
About Multiblock Reads v4
 
Performance data visualization with r and tableau
Performance data visualization with r and tableauPerformance data visualization with r and tableau
Performance data visualization with r and tableau
 
Epic Clarity Running on Exadata
Epic Clarity Running on ExadataEpic Clarity Running on Exadata
Epic Clarity Running on Exadata
 
Sql tuning tools of the trade
Sql tuning tools of the tradeSql tuning tools of the trade
Sql tuning tools of the trade
 
SQLT XPLORE - The SQLT XPLAIN Hidden Child
SQLT XPLORE -  The SQLT XPLAIN Hidden ChildSQLT XPLORE -  The SQLT XPLAIN Hidden Child
SQLT XPLORE - The SQLT XPLAIN Hidden Child
 

Recently uploaded

Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfMounikaPolabathina
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESmohitsingh558521
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 

Recently uploaded (20)

Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
What is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdfWhat is DBT - The Ultimate Data Build Tool.pdf
What is DBT - The Ultimate Data Build Tool.pdf
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICESSALESFORCE EDUCATION CLOUD | FEXLE SERVICES
SALESFORCE EDUCATION CLOUD | FEXLE SERVICES
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 

Mini Session - Using GDB for Profiling

  • 1. ©2013  Enkitec   Mini  session   Se2ng  up  and  using  gdb  for  profiling Frits  Hoogland   Collaborate  2014,  Las  Vegas 1 This is the font size used for showing screen output. Be sure this is readable for you.
  • 2. `whoami` • Frits  Hoogland   • Working  with  Oracle  products  since  1996   ! • Blog:  hLp://fritshoogland.wordpress.com   • TwiLer:  @fritshoogland   • Email:  frits.hoogland@enkitec.com   • Oracle  ACE  Director   • OakTable  Member 2
  • 3. 3 •  Early&bird&discount&expires&April&15,&2014. •  Quick links: –  Home: www.enkitec.com/e4 –  Registration: http://www.enkitec.com/e4/register –  Location: http://www.enkitec.com/e4/location –  Training Days Following E4: http://www.enkitec.com/e4/training-days
  • 4. Goals  &  prerequisites   • Goal:  give  a  primer  on  using  gdb  for  profiling  C   funcXon  sequences.  This  is  by  no  means  a   comprehensive,  full  explanaXon.   ! • Prerequisites:   – Understanding  of  (internal)  execuXon  of  C  programs.   – Understanding  of  Oracle  tracing  mechanisms. 4
  • 5. Use  the  correct  tool! • In  order  to  troubleshoot  performance  problems   or  unexpected  behaviour,  sql_trace  at  level  8  is  a   decent  starXng  point.   ! • sql_trace,  level  8   • system  calls:  strace  (combined  with  sql_trace)   • funcXon  calls:  gdb   ! • This  means  using  gdb  is  no  “one  size  fits  all”  res. 5
  • 6. Scope • gdb  is  the  GNU  debugger.   • Installed  by  default  on  at  least  OL  &  RHEL.   ! • Not  a  dependency  of  the  Oracle  database.   ! • This  means  it’s  installed  on  most  systems! 6
  • 7. Scope • gdb  is  meant  for  debugging  C  programs.   ! • in  order  to  do  so,  the  ‘-­‐g’  flag  must  be  added   when  compiling  the  program  (gcc).   – The  ‘-­‐g’  flag  adds  debug  info  to  the  executable.   ! • The  oracle  database  executables  do  NOT  contain   this  info! 7
  • 8. Scope • Normal  usage  of  gdb  is  to  start  gdb  with  the   executable  to  be  debugged:   – gdb  mycompiledprogram   ! • This  can  not  be  done  with  the  oracle  database. 8
  • 9. Symbol  table • The  Oracle  executable  is  dynamically  linked:   ! $ ldd oracle linux-vdso.so.1 => (0x00007fff1dbff000) libodm11.so => /u01/app/oracle/product/11.2.0.1/dbhome_1/lib/libodm11.so (0x00.. libcell11.so => /u01/app/oracle/product/11.2.0.1/dbhome_1/lib/libcell11.so (0x.. libskgxp11.so => /u01/app/oracle/product/11.2.0.1/dbhome_1/lib/libskgxp11.so (.. librt.so.1 => /lib64/librt.so.1 (0x0000003f39600000) libnnz11.so => /u01/app/oracle/product/11.2.0.1/dbhome_1/lib/libnnz11.so (0x0.. libclsra11.so => /u01/app/oracle/product/11.2.0.1/dbhome_1/lib/libclsra11.so (.. ... 9
  • 10. Symbol  table • A  DL  executable  does  not  know  the  code   locaXon  of  a  funcXon  in  a  library  upfront.   – Think  new  version  of  library,  3rd  party,  etc.   ! • In  order  to  find  these  funcXons,  there’s  a  table  of   funcXon  to  code-­‐locaXon. 10
  • 11. Symbol  table • The  symbol  table  can  be  shown  with  the  ‘nm’   command.   ! $ nm oracle | grep kcbgtcr 00000000082c8bca T kcbgtcr 0000000003ed68a2 T kcbgtcrf ! ! • gdb  can  use  the  symbol  table  to  understand  in   which  funcXon  execuXon  is  taking  place. 11
  • 12. Using  gdb  on  processes • gdb  can  aLach  to  (running)  processes  using:   gdb  -­‐p  <PID>   ! • This  will  suspend  execuXon  of  that  process  (!!)   ! • Mind  the  absence  of  ‘oracle’;  this  is  not  oracle   specific. 12
  • 13. Warning • gdb  allows  you  to  do  specific  things.   • If  you  want  to  know  where  oracle  spend  its  Xme:   – Use  10046/sql_trace  at  level  8.   • If  you  want  to  know  what  logical  steps  oracle   executed:   – Use  an  execuXon  plan.   • If  you  want  to  look  at  system  calls  (I/O!):   – Use  strace  (*although  it  can  leave  out  informaXon)   • If  you  want  to  look  at  C  funcXon  call  level:   – Use  gdb. 13
  • 14. using  gdb  on  oracle • ALach  to  a  running  Oracle  process  (root!):   # gdb -p 6615 GNU gdb (GDB) Red Hat Enterprise Linux (7.2-56.el6) Copyright (C) 2010 Free Software Foundation, Inc. ... Attaching to process 6615 Reading symbols from /u01/app/oracle/product/11.2.0.3/dbhome_1/bin/oracle...(no debugging symbols found)...done. Reading symbols from /u01/app/oracle/product/11.2.0.3/dbhome_1/lib/ libcell11.so...done. Loaded symbols for /u01/app/oracle/product/11.2.0.3/dbhome_1/lib/libcell11.so Loaded symbols for /u01/app/oracle/product/11.2.0.3/dbhome_1/lib/libnque11.so 0x0000003f38a0e530 in __read_nocancel () from /lib64/libpthread.so.0 Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.80.el6_3.6.x86_64 libaio-0.3.107-10.el6.x86_64 numactl-2.0.7-3.el6.x86_64 (gdb) 14
  • 15. using  gdb  on  oracle • The  database  session  is  stuck  now:   $ sqlplus ts/ts@v11203 ! SQL*Plus: Release 11.2.0.3.0 Production on Mon Dec 9 15:51:05 2013 ! Copyright (c) 1982, 2011, Oracle. All rights reserved. ! ! Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production With the Partitioning, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options ! TS@v11203 > TS@v11203 > select * from dual; 15
  • 16. using  gdb  on  oracle • Now  let  the  oracle  process  conXnue:   ! (gdb) c Continuing. ! • ‘select  *  from  dual’  conXnues.   – Please  mind  performance  is  much  lower  with  gdb   aLached  to  a  process!   ! • A  process  can  be  suspended  at  any  Xme  by   pressing  CTRL+c  in  gdb. 16
  • 17. • The  funcXonality  that  is  useful  for  profiling,  is   using  the  ‘break’  funcXonality.   ! • The  funcXon  of  break  is  to  ‘break’  execuXon   when  a  certain  funcXon  is  entered.   ! • Granularity  of  breaking  is  funcXon  call  level. 17
  • 18. • Let’s  break  on  a  well  known  funcXon:  io_submit()   ^C Program received signal SIGINT, Interrupt. (gdb) break io_submit Breakpoint 1 at 0x3f38200660 (gdb) c Continuing. 18
  • 19. • Issue  a  full  scan  (to  make  oracle  use  of  AIO):   ! TS@v11203 > select count(*) from t2; ! ! • This  will  trigger  AIO,  and  gdb  breaks  execuXon:   ! (gdb) c Continuing. ! Breakpoint 1, 0x0000003f38200660 in io_submit () from /lib64/libaio.so.1 (gdb) 19
  • 20. • So  we  now  we  know  the  Oracle  process  called   ‘io_submit()’.     ! • If  we  press  ‘c’  (conXnue),  the  process  conXnues.   (gdb) c Continuing. ! Breakpoint 1, 0x0000003f38200660 in io_submit () from /lib64/libaio.so.1 (gdb) ! • Another  encounter  of  ‘io_submit()’,  etc. 20
  • 21. • The  conXnue  command  can  be  automated:   (gdb) commands 1 Type commands for breakpoint(s) 1, one per line. End with a line saying just "end". >c >end (gdb) c Continuing. ! Breakpoint 1, 0x0000003f38200660 in io_submit () from /lib64/libaio.so.1 ! Breakpoint 1, 0x0000003f38200660 in io_submit () from /lib64/libaio.so.1 ! ... 21
  • 22. • Let’s  add  breaking  on  io_getevents()  too:   ^C Program received signal SIGINT, Interrupt. 0x0000003f38a0e530 in __read_nocancel () from /lib64/libpthread.so.0 (gdb) break 'io_getevents@plt' Breakpoint 2 at 0x3f382006a0 (gdb) commands Type commands for breakpoint(s) 2, one per line. End with a line saying just "end". >c >end (gdb) c Continuing. 22
  • 23. • Issue  another  full  scan:   TS@v11203 > select count(*) from t2; • Now  we  see  the  AIO  calls  in  gdb:   (gdb) c Continuing. Breakpoint 1, 0x0000003f38200660 in io_submit () from /lib64/libaio.so.1 ! Breakpoint 1, 0x0000003f38200660 in io_submit () from /lib64/libaio.so.1 ! Breakpoint 2, 0x0000000000a09030 in io_getevents@plt () ! Breakpoint 1, 0x0000003f38200660 in io_submit () from /lib64/libaio.so.1 ! Breakpoint 1, 0x0000003f38200660 in io_submit () from /lib64/libaio.so.1 ! Breakpoint 2, 0x0000000000a09030 in io_getevents@plt () 23
  • 24. • Wait!  Don’t  we  now  have  exactly  the  same  as   strace,  but  in  a  very  difficult  way?   ! # strace -e trace=io_submit,io_getevents -p 10430 Process 10430 attached - interrupt to quit io_submit(140441218691072, 1, {{0x7fbb03109450, 0, 0, 0, 257}}) = 1 io_submit(140441218691072, 1, {{0x7fbb031091f8, 0, 0, 0, 257}}) = 1 io_getevents(140441218691072, 2, 128, {{0x7fbb03109450, 0x7fbb03109450, 106496, 0}}, {0, 0}) = 1 io_getevents(140441218691072, 1, 128, {{0x7fbb031091f8, 0x7fbb031091f8, 122880, 0}}, {0, 0}) = 1 io_submit(140441218691072, 1, {{0x7fbb03109450, 0, 0, 0, 257}}) = 1 io_getevents(140441218691072, 1, 128, {{0x7fbb03109450, 0x7fbb03109450, 122880, 0}}, {0, 0}) = 1 24
  • 25. • Yes.   • But  once  you  add  in  (oracle)  user  land  funcXons,   the  advantage  becomes  clear:   ! • kslwtbctx  ()  :  start  a  wait  event*   • kslwtectx  ()  :  end  a  wait  event*   ! *Oracle  11  and  up 25
  • 26. • Add  these  funcXons  to  the  breaks:   (gdb) break io_submit Breakpoint 1 at 0x3f38200660 (gdb) break 'io_getevents@plt' Breakpoint 2 at 0xa09030 (gdb) rbreak ^kslwt[be]ctx Breakpoint 3 at 0x8f9a652 <function, no debug info> kslwtbctx; Breakpoint 4 at 0x8fa1334 <function, no debug info> kslwtectx; (gdb) commands 1-4 Type commands for breakpoint(s) 1-4, one per line. End with a line saying just "end". >c >end (gdb) c Continuing. 26
  • 27. • And  issue  the  scan  again,  gdb  now  shows:   Breakpoint 1, 0x0000003f38200660 in io_submit () from /lib64/libaio.so.1 ! Breakpoint 1, 0x0000003f38200660 in io_submit () from /lib64/libaio.so.1 ! Breakpoint 2, 0x0000000000a09030 in io_getevents@plt () ! Breakpoint 2, 0x0000000000a09030 in io_getevents@plt () ! Breakpoint 2, 0x0000000000a09030 in io_getevents@plt () ! Breakpoint 2, 0x0000000000a09030 in io_getevents@plt () ! Breakpoint 3, 0x0000000008f9a652 in kslwtbctx () ! Breakpoint 2, 0x0000000000a09030 in io_getevents@plt () 27
  • 28. • Wait!  There’s  more!   ! • The  Oracle  database  doesn’t  have/distribute   debug  symbols.   • But  Oracle  Linux  has!   – These  are  called  the  ‘debuginfo’  packages!   – Available  on  hLps://oss.oracle.com/ol6/debuginfo/   – As  yum  repo  (!) 28
  • 29. • Add  the  debuginfo  repository  to  your  yum  config:   ! # vi /etc/yum.repos.d/debuginfo.repo [ol6_debuginfo] name=Oracle Linux 6 debuginfo baseurl=http://oss.oracle.com/ol6/debuginfo gpgkey=https://oss.oracle.com/ol6/RPM-GPG-KEY-oracle gpgcheck=1 enabled=1 29
  • 30. • Watch  what  gdb  tells  you  when  you  aLach  to  an   oracle  process:   ! Reading symbols from /u01/app/oracle/product/11.2.0.3/dbhome_1/lib/libnque11.so... (no debugging symbols found)...done. Loaded symbols for /u01/app/oracle/product/11.2.0.3/dbhome_1/lib/libnque11.so 0x0000003f38a0e530 in __read_nocancel () from /lib64/libpthread.so.0 Missing separate debuginfos, use: debuginfo-install glibc-2.12-1.80.el6_3.6.x86_64 libaio-0.3.107-10.el6.x86_64 numactl-2.0.7-3.el6.x86_64 (gdb) ! • This  leaves  the  impression  that  you  should   execute  ‘debuginfo-­‐install’…   30
  • 31. • No!  That  actually  is  RH  specific  (AFAIK)   • Use:   # yum install glibc-debuginfo libaio-debuginfo numactl-debuginfo ! • Sadly,  this  *might*  not  work…   – Personal  experience  is  the  metadata  of  oss  repo  is  not   kept  up  to  date  very  much…   – It  will  install  the  latest  version  in  the  metadata.   • If  it  doesn’t  work,  use  rpm  directly:   # rpm -Uvh https://oss.oracle.com/ol6/debuginfo/glibc-debuginfo- common-2.12-1.80.el6_3.6.x86_64.rpm 31
  • 32. • Now  aLach  to  an  Oracle  session  again:   ! 0x0000003f38a0e530 in __read_nocancel () at ../sysdeps/unix/syscall-template.S:82 82 T_PSEUDO (SYSCALL_SYMBOL, SYSCALL_NAME, SYSCALL_NARGS) (gdb) ! • Look  what  io_submit  ()/io_getevents  ()  shows:   (gdb) break io_submit Breakpoint 1 at 0x3f38200660: file io_submit.c, line 23. (gdb) break io_getevents_0_4 Breakpoint 2 at 0x3f38200620: file io_getevents.c, line 46. (gdb) commands 1-2 Type commands for breakpoint(s) 1-2, one per line. End with a line saying just "end". >c >end (gdb) c Continuing. 32
  • 33. debuginfo:  funcXon  call  args Breakpoint 1, io_submit (ctx=0x7fbb04f3a000, nr=1, iocbs=0x7fffcffce7a0) at io_submit.c:23 23 io_syscall3(int, io_submit, io_submit, io_context_t, ctx, long, nr, struct iocb **, iocbs) ! Breakpoint 1, io_submit (ctx=0x7fbb04f3a000, nr=1, iocbs=0x7fffcffce7a0) at io_submit.c:23 23 io_syscall3(int, io_submit, io_submit, io_context_t, ctx, long, nr, struct iocb **, iocbs) ! Breakpoint 2, io_getevents_0_4 (ctx=0x7fbb04f3a000, min_nr=2, nr=128, events=0x7fffcffd6e08, timeout=0x7fffcffd7e10) at io_getevents.c:46 46 if (ring==NULL || ring->magic != AIO_RING_MAGIC) ! Breakpoint 2, io_getevents_0_4 (ctx=0x7fbb04f3a000, min_nr=2, nr=128, events=0x7fffcffd9ee8, timeout=0x7fffcffdaef0) at io_getevents.c:46 46 if (ring==NULL || ring->magic != AIO_RING_MAGIC) ! Breakpoint 2, io_getevents_0_4 (ctx=0x7fbb04f3a000, min_nr=2, nr=128, events=0x7fffcffd6c08, timeout=0x7fffcffd7c10) at io_getevents.c:46 46 if (ring==NULL || ring->magic != AIO_RING_MAGIC) 33
  • 34. • Other  useful  gdb  commands:   – info  break   – save  breakpoints  <yourfilename>   – source  <yourfilename>   – disable  <breaknr>   – enable  <breaknr>   – set  paginaXon  off   – q   – ~/.gdbinit   – bt 34