All of lore.kernel.org
 help / color / mirror / Atom feed
* Is it possible to get source code annotation for kernel modules ?
@ 2014-11-26 21:05 Jerome Correnoz
  2014-12-15  8:51 ` Jerome Correnoz
  0 siblings, 1 reply; 4+ messages in thread
From: Jerome Correnoz @ 2014-11-26 21:05 UTC (permalink / raw)
  To: linux-perf-users

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Is it possible to get source code annotation for kernel modules ?
  2014-11-26 21:05 Is it possible to get source code annotation for kernel modules ? Jerome Correnoz
@ 2014-12-15  8:51 ` Jerome Correnoz
  2014-12-16 11:44   ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 4+ messages in thread
From: Jerome Correnoz @ 2014-12-15  8:51 UTC (permalink / raw)
  To: linux-perf-users

Hi,

Could someone please provide support on it ? 

We would like to know if 'perf annotate' can allow to display the C source
code interleaved with disassembly for the kernel modules (we can get it only
for user space application. For kerne modules, we only have the
disassembly). Is it feasible for kernel modules ?

Regards,
  Jerome 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Is it possible to get source code annotation for kernel modules ?
  2014-12-15  8:51 ` Jerome Correnoz
@ 2014-12-16 11:44   ` Arnaldo Carvalho de Melo
  2014-12-18 15:23     ` Jerome CORRENOZ
  0 siblings, 1 reply; 4+ messages in thread
From: Arnaldo Carvalho de Melo @ 2014-12-16 11:44 UTC (permalink / raw)
  To: Jerome Correnoz; +Cc: linux-perf-users

Em Mon, Dec 15, 2014 at 08:51:36AM +0000, Jerome Correnoz escreveu:
> Hi,
> 
> Could someone please provide support on it ? 
> 
> We would like to know if 'perf annotate' can allow to display the C source
> code interleaved with disassembly for the kernel modules (we can get it only
> for user space application. For kerne modules, we only have the
> disassembly). Is it feasible for kernel modules ?

Yes it is possible, as is possible for userspace, someone has to work on it.

- Arnaldo

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Is it possible to get source code annotation for kernel modules ?
  2014-12-16 11:44   ` Arnaldo Carvalho de Melo
@ 2014-12-18 15:23     ` Jerome CORRENOZ
  0 siblings, 0 replies; 4+ messages in thread
From: Jerome CORRENOZ @ 2014-12-18 15:23 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo; +Cc: linux-perf-users@vger.kernel.org

Hi Arnaldo,

It would be a nice feature. In particular when people are interested to display C source annotation for a specific kernel module.

Best Regards,
  Jerome

-----Original Message-----
From: Arnaldo Carvalho de Melo [mailto:acme@kernel.org] 
Sent: Tuesday, December 16, 2014 12:45 PM
To: Jerome CORRENOZ
Cc: linux-perf-users@vger.kernel.org
Subject: Re: Is it possible to get source code annotation for kernel modules ?

Em Mon, Dec 15, 2014 at 08:51:36AM +0000, Jerome Correnoz escreveu:
> Hi,
> 
> Could someone please provide support on it ? 
> 
> We would like to know if 'perf annotate' can allow to display the C 
> source code interleaved with disassembly for the kernel modules (we 
> can get it only for user space application. For kerne modules, we only 
> have the disassembly). Is it feasible for kernel modules ?

Yes it is possible, as is possible for userspace, someone has to work on it.

- Arnaldo

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-12-18 15:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-26 21:05 Is it possible to get source code annotation for kernel modules ? Jerome Correnoz
2014-12-15  8:51 ` Jerome Correnoz
2014-12-16 11:44   ` Arnaldo Carvalho de Melo
2014-12-18 15:23     ` Jerome CORRENOZ

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.