Linux Perf Users
 help / color / mirror / Atom feed
From: Jerome Correnoz <jerome.correnoz@st.com>
To: linux-perf-users@vger.kernel.org
Subject: Is it possible to get source code annotation for kernel modules ?
Date: Wed, 26 Nov 2014 21:05:23 +0000 (UTC)	[thread overview]
Message-ID: <loom.20141126T215923-206@post.gmane.org> (raw)

Hi all,

With 'pref annotate', when compiling a user space application with '-
ggdb', we successfully display C source code interleaved with disassembly.

ercent |      Source code & Disassembly of dvbtest
------------------------------------------------
         :
         :
         :
         :      Disassembly of section .text:
         :
         :      00029c2c <PutBits>:
         :      }
         :      /*}}}*/
         :
         :      /*{{{  PutBits functions*/
         :      void PutBits(BitPacker_t *ld, unsigned int code, unsigned 
int length)
         :      {
   16.67 :         29c2c:       push    {fp}            ; (str fp, [sp, #-
4]!)
    0.00 :         29c30:       add     fp, sp, #0
    0.00 :         29c34:       sub     sp, sp, #28
    0.00 :         29c38:       str     r0, [fp, #-16]
    0.00 :         29c3c:       str     r1, [fp, #-20]
    0.00 :         29c40:       str     r2, [fp, #-24]
         :          unsigned int bit_buf;
         :          int bit_left;
         :
         :          bit_buf = ld->BitBuffer;
    0.00 :         29c44:       ldr     r3, [fp, #-16]
    0.00 :         29c48:       ldr     r3, [r3, #4]
    0.00 :         29c4c:       str     r3, [fp, #-8]
         :          bit_left = ld->Remaining;
    0.00 :         29c50:       ldr     r3, [fp, #-16]
    0.00 :         29c54:       ldr     r3, [r3, #8]
    0.00 :         29c58:       str     r3, [fp, #-12]
         :              DVBTEST_TRACE("code = %d, length = %d, bit_buf = 
0x%x, bit_left = %d\n", code, length, bit_buf, bit_left);
         :          }


We would like to know if possible for kernel module to get the source code 
interleaved with disassembly ? For time being, we only have disassembly 
with annotation. It would be very useful if we could have C source code 
annotation for kernel module.

Regards,
  Jerome

             reply	other threads:[~2014-11-26 21:05 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-26 21:05 Jerome Correnoz [this message]
2014-12-15  8:51 ` Is it possible to get source code annotation for kernel modules ? Jerome Correnoz
2014-12-16 11:44   ` Arnaldo Carvalho de Melo
2014-12-18 15:23     ` Jerome CORRENOZ

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=loom.20141126T215923-206@post.gmane.org \
    --to=jerome.correnoz@st.com \
    --cc=linux-perf-users@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox