kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: rcpilot2010@gmail.com (Abu Rasheda)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Module vs Kernel main performacne
Date: Thu, 7 Jun 2012 10:47:31 -0700	[thread overview]
Message-ID: <CACYKDtgMRGsN8NGknerbGL8SG1O2EjSDCRsY=jQZUQ7OWmvdFw@mail.gmail.com> (raw)
In-Reply-To: <CA+MoWDrcS4de=HYVrFUKX_0G8CCg-T9JsB-TxPRpYteXVtE0fQ@mail.gmail.com>

>
> Hello Abu,
>
> I had to include <linux/module.h> or an error was issued about
> "THIS_MODULE".
>

I am running this tool on Scientific Linux 6.0, which is 2.6.32 kernel. I
know this is old but this is what I have for my product.


> What Kernel version are you using? I'm trying to compile it and I'm
> getting the error:
>
> [peter at ace m]$ make
> make -C /lib/modules/3.3.7-1.fc17.x86_64/build SUBDIRS=`pwd` modules
> make[1]: Entering directory `/usr/src/kernels/3.3.7-1.fc17.x86_64'
>  CC [M]  /tmp/m/m.o
> /tmp/m/m.c:36:2: error: unknown field ?ioctl? specified in initializer
> /tmp/m/m.c:36:2: warning: initialization from incompatible pointer
> type [enabled by default]
> /tmp/m/m.c:36:2: warning: (near initialization for ?m_fops.llseek?)
> [enabled by default]
> make[2]: *** [/tmp/m/m.o] Error 1
> make[1]: *** [_module_/tmp/m] Error 2
> make[1]: Leaving directory `/usr/src/kernels/3.3.7-1.fc17.x86_64'
> make: *** [module] Error 2
>
> According to:
> http://lxr.linux.no/linux+v3.4.1/include/linux/fs.h#L1609
>
> There is no .ioctl at struct file_operations...
>
> Can you share how you've used perf/oprofile on your module/Kernel code?
>
> []'s
>
> Peter


for perf:

perf stat -e
cpu-cycles,stalled-cycles-frontend,stalled-cycles-backend,instructions,cache-references,cache-misses,branch-instructions,branch-misses,bus-cycles,cpu-clock,task-clock,page-faults,minor-faults,major-faults,context-switches,cpu-migrations,alignment-faults,emulation-faults,L1-dcache-loads,L1-dcache-load-misses,L1-dcache-stores,L1-dcache-store-misses,L1-dcache-prefetches,L1-dcache-prefetch-misses,L1-icache-loads,L1-icache-load-misses,L1-icache-prefetches,L1-icache-prefetch-misses,LLC-loads,LLC-load-misses,LLC-stores,LLC-store-misses,LLC-prefetches,LLC-prefetch-misses,dTLB-loads,dTLB-load-misses,dTLB-stores,dTLB-store-misses,dTLB-prefetches,dTLB-prefetch-misses,iTLB-loads,iTLB-load-misses,branch-loads,branch-load-misses,syscalls:sys_enter_sendmsg,syscalls:sys_exit_sendmsg,sched:sched_wakeup,sched:sched_stat_sleep
./prog

for oprofile:

# opcontrol --reset
# opcontrol --vmlinux=/boot/vmlinux.64
# opcontrol --start
# ./a.out
# opcontrol --shutdown
# opreport -l -p
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120607/ab773484/attachment.html 

  reply	other threads:[~2012-06-07 17:47 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-29 23:50 Module vs Kernel main performacne Abu Rasheda
2012-05-30  4:18 ` Mulyadi Santosa
2012-05-30  4:51   ` Abu Rasheda
2012-05-30 16:45     ` Mulyadi Santosa
2012-05-30 21:44       ` Abu Rasheda
2012-05-31  0:17         ` Abu Rasheda
2012-05-31  5:35         ` Mulyadi Santosa
2012-05-31 13:35           ` Abu Rasheda
2012-06-01  0:27             ` Chetan Nanda
2012-06-01 18:52               ` Abu Rasheda
2012-06-07 13:11                 ` Peter Senna Tschudin
2012-06-07 17:47                   ` Abu Rasheda [this message]
2012-06-07 18:10                     ` Peter Senna Tschudin
2012-06-09  1:52                       ` Abu Rasheda
2012-06-07 23:36 ` Peter Senna Tschudin
2012-06-07 23:41   ` Abu Rasheda

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='CACYKDtgMRGsN8NGknerbGL8SG1O2EjSDCRsY=jQZUQ7OWmvdFw@mail.gmail.com' \
    --to=rcpilot2010@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.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;
as well as URLs for NNTP newsgroup(s).