public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* Generating Instrumentation for Other Computers
@ 2017-03-01 11:21 Arkady
  2017-03-01 12:37 ` Arkady
  0 siblings, 1 reply; 4+ messages in thread
From: Arkady @ 2017-03-01 11:21 UTC (permalink / raw)
  To: systemtap

Hi,

I am trying to create a build environment for generating the kernel
modules for other computers. My goal is to have a chroot with multiple
kernel-devel/debuginfo packages.
I started by following
https://sourceware.org/systemtap/SystemTap_Beginners_Guide/cross-compiling.html
I downloaded and installed packages for 2.6.32-71.7.1.el6.x86_64 (a
random pick of the kernel) manually using

rpm --force  -ivh  kernel-debuginfo-2.6.32-71.7.1.el6.x86_64.rpm
kernel-debuginfo-common-x86_64-2.6.32-71.7.1.el6.x86_64.rpm
kernel-devel-2.6.32-71.7.1.el6.x86_64.rpm

After that I tried

stap -r 2.6.32-71.7.1.el6.x86_64 -p4 <script_name>.stp

I am getting

semantic error: missing x86_64 kernel/module debuginfo [man
warning::debuginfo] under
'/home/arkady/debuginfo/usr/src/kernels/2.6.32-71.7.1.el6.x86_64'

I tried to specify --root in the command to rpm and avoid --force this
way. STAP command is
stap -r <root here>/usr/src/kernels/2.6.32-71.7.1.el6.x86_64 -p4
<script_name>.stp

It did not solve the problem. This is how my
usr/src/kernels/2.6.32-71.7.1.el6.x86_64/ looks like

Makefile   Module.symvers  arch   crypto   firmware  include  ipc
lib  net      scripts   sound  usr Makefile.common  System.map
block  drivers  fs        init     kernel  mm   samples  security
tools  virt

and /usr/src/kernels/2.6.32-642.el6.x86_64/kernel/

Kconfig.freezer  Kconfig.hz  Kconfig.preempt  Makefile  events  gcov
irq  power  time  trace

I went on to the file dwflpp.cxx and tried to figure out what is
missing - my theory was that some symlink can solve the problem. From
the source code it appears that dwfl_module_getdwarf() fails to parse
the module (or found it).

What module?

Thank you, Arkady.

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

* Re: Generating Instrumentation for Other Computers
  2017-03-01 11:21 Generating Instrumentation for Other Computers Arkady
@ 2017-03-01 12:37 ` Arkady
  2017-03-01 13:49   ` Arkady
  0 siblings, 1 reply; 4+ messages in thread
From: Arkady @ 2017-03-01 12:37 UTC (permalink / raw)
  To: systemtap

Another piece of information. When running with verbose output among
other things I am getting

Created temporary directory "/tmp/stapqv5YN0"
Session arch: x86_64 release: 2.6.32-71.7.1.el6.x86_64
Parsed kernel "/home/arkady/debuginfo/./usr/src/kernels/2.6.32-71.7.1.el6.x86_64/.config",
containing 2952 tuples
Parsed kernel "/home/arkady/debuginfo/./usr/src/kernels/2.6.32-71.7.1.el6.x86_64/Module.symvers",
containing 5083 vmlinux exports
Parsed kernel "/home/arkady/debuginfo/./usr/src/kernels/2.6.32-71.7.1.el6.x86_64/System.map",
containing 25650 symbols
Processing tapset "/usr/share/systemtap/tapset/linux/context.stpm"
......
Searched: "/usr/share/systemtap/tapset/*.stp", found: 26, processed: 26
Processing tapset "/home/arkady/agent/LinuxAgent/tapset/dentry.stp"
Processing tapset "/home/arkady/agent/LinuxAgent/tapset/sysfs.stp"
Processing tapset "/home/arkady/agent/LinuxAgent/tapset/task.stp"
Searched: "/home/arkady/agent/LinuxAgent/tapset/*.stp", found: 3, processed: 3
Pass 1: parsed user script and 114 library script(s) using
207088virt/34908res/3232shr/32000data kb, in 200usr/30sys/224real ms.
Attempting to extract kernel debuginfo build ID from
/home/arkady/debuginfo/./usr/src/kernels/2.6.32-71.7.1.el6.x86_64/vmlinux.id



On Wed, Mar 1, 2017 at 1:20 PM, Arkady <arkady.miasnikov@gmail.com> wrote:
> Hi,
>
> I am trying to create a build environment for generating the kernel
> modules for other computers. My goal is to have a chroot with multiple
> kernel-devel/debuginfo packages.
> I started by following
> https://sourceware.org/systemtap/SystemTap_Beginners_Guide/cross-compiling.html
> I downloaded and installed packages for 2.6.32-71.7.1.el6.x86_64 (a
> random pick of the kernel) manually using
>
> rpm --force  -ivh  kernel-debuginfo-2.6.32-71.7.1.el6.x86_64.rpm
> kernel-debuginfo-common-x86_64-2.6.32-71.7.1.el6.x86_64.rpm
> kernel-devel-2.6.32-71.7.1.el6.x86_64.rpm
>
> After that I tried
>
> stap -r 2.6.32-71.7.1.el6.x86_64 -p4 <script_name>.stp
>
> I am getting
>
> semantic error: missing x86_64 kernel/module debuginfo [man
> warning::debuginfo] under
> '/home/arkady/debuginfo/usr/src/kernels/2.6.32-71.7.1.el6.x86_64'
>
> I tried to specify --root in the command to rpm and avoid --force this
> way. STAP command is
> stap -r <root here>/usr/src/kernels/2.6.32-71.7.1.el6.x86_64 -p4
> <script_name>.stp
>
> It did not solve the problem. This is how my
> usr/src/kernels/2.6.32-71.7.1.el6.x86_64/ looks like
>
> Makefile   Module.symvers  arch   crypto   firmware  include  ipc
> lib  net      scripts   sound  usr Makefile.common  System.map
> block  drivers  fs        init     kernel  mm   samples  security
> tools  virt
>
> and /usr/src/kernels/2.6.32-642.el6.x86_64/kernel/
>
> Kconfig.freezer  Kconfig.hz  Kconfig.preempt  Makefile  events  gcov
> irq  power  time  trace
>
> I went on to the file dwflpp.cxx and tried to figure out what is
> missing - my theory was that some symlink can solve the problem. From
> the source code it appears that dwfl_module_getdwarf() fails to parse
> the module (or found it).
>
> What module?
>
> Thank you, Arkady.

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

* Re: Generating Instrumentation for Other Computers
  2017-03-01 12:37 ` Arkady
@ 2017-03-01 13:49   ` Arkady
  2017-03-01 13:52     ` Arkady
  0 siblings, 1 reply; 4+ messages in thread
From: Arkady @ 2017-03-01 13:49 UTC (permalink / raw)
  To: systemtap

I have figured it out. The following solves the problem

export SYSTEMTAP_DEBUGINFO_PATH=$PWD/./usr/lib/debug/lib/modules/2.6.32-71.7.1.el6.x86_64



On Wed, Mar 1, 2017 at 2:37 PM, Arkady <arkady.miasnikov@gmail.com> wrote:
> Another piece of information. When running with verbose output among
> other things I am getting
>
> Created temporary directory "/tmp/stapqv5YN0"
> Session arch: x86_64 release: 2.6.32-71.7.1.el6.x86_64
> Parsed kernel "/home/arkady/debuginfo/./usr/src/kernels/2.6.32-71.7.1.el6.x86_64/.config",
> containing 2952 tuples
> Parsed kernel "/home/arkady/debuginfo/./usr/src/kernels/2.6.32-71.7.1.el6.x86_64/Module.symvers",
> containing 5083 vmlinux exports
> Parsed kernel "/home/arkady/debuginfo/./usr/src/kernels/2.6.32-71.7.1.el6.x86_64/System.map",
> containing 25650 symbols
> Processing tapset "/usr/share/systemtap/tapset/linux/context.stpm"
> ......
> Searched: "/usr/share/systemtap/tapset/*.stp", found: 26, processed: 26
> Processing tapset "/home/arkady/agent/LinuxAgent/tapset/dentry.stp"
> Processing tapset "/home/arkady/agent/LinuxAgent/tapset/sysfs.stp"
> Processing tapset "/home/arkady/agent/LinuxAgent/tapset/task.stp"
> Searched: "/home/arkady/agent/LinuxAgent/tapset/*.stp", found: 3, processed: 3
> Pass 1: parsed user script and 114 library script(s) using
> 207088virt/34908res/3232shr/32000data kb, in 200usr/30sys/224real ms.
> Attempting to extract kernel debuginfo build ID from
> /home/arkady/debuginfo/./usr/src/kernels/2.6.32-71.7.1.el6.x86_64/vmlinux.id
>
>
>
> On Wed, Mar 1, 2017 at 1:20 PM, Arkady <arkady.miasnikov@gmail.com> wrote:
>> Hi,
>>
>> I am trying to create a build environment for generating the kernel
>> modules for other computers. My goal is to have a chroot with multiple
>> kernel-devel/debuginfo packages.
>> I started by following
>> https://sourceware.org/systemtap/SystemTap_Beginners_Guide/cross-compiling.html
>> I downloaded and installed packages for 2.6.32-71.7.1.el6.x86_64 (a
>> random pick of the kernel) manually using
>>
>> rpm --force  -ivh  kernel-debuginfo-2.6.32-71.7.1.el6.x86_64.rpm
>> kernel-debuginfo-common-x86_64-2.6.32-71.7.1.el6.x86_64.rpm
>> kernel-devel-2.6.32-71.7.1.el6.x86_64.rpm
>>
>> After that I tried
>>
>> stap -r 2.6.32-71.7.1.el6.x86_64 -p4 <script_name>.stp
>>
>> I am getting
>>
>> semantic error: missing x86_64 kernel/module debuginfo [man
>> warning::debuginfo] under
>> '/home/arkady/debuginfo/usr/src/kernels/2.6.32-71.7.1.el6.x86_64'
>>
>> I tried to specify --root in the command to rpm and avoid --force this
>> way. STAP command is
>> stap -r <root here>/usr/src/kernels/2.6.32-71.7.1.el6.x86_64 -p4
>> <script_name>.stp
>>
>> It did not solve the problem. This is how my
>> usr/src/kernels/2.6.32-71.7.1.el6.x86_64/ looks like
>>
>> Makefile   Module.symvers  arch   crypto   firmware  include  ipc
>> lib  net      scripts   sound  usr Makefile.common  System.map
>> block  drivers  fs        init     kernel  mm   samples  security
>> tools  virt
>>
>> and /usr/src/kernels/2.6.32-642.el6.x86_64/kernel/
>>
>> Kconfig.freezer  Kconfig.hz  Kconfig.preempt  Makefile  events  gcov
>> irq  power  time  trace
>>
>> I went on to the file dwflpp.cxx and tried to figure out what is
>> missing - my theory was that some symlink can solve the problem. From
>> the source code it appears that dwfl_module_getdwarf() fails to parse
>> the module (or found it).
>>
>> What module?
>>
>> Thank you, Arkady.

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

* Re: Generating Instrumentation for Other Computers
  2017-03-01 13:49   ` Arkady
@ 2017-03-01 13:52     ` Arkady
  0 siblings, 0 replies; 4+ messages in thread
From: Arkady @ 2017-03-01 13:52 UTC (permalink / raw)
  To: systemtap

and this link helped to solve the puzzle
https://www.sourceware.org/systemtap/man/stappaths.7.html

On Wed, Mar 1, 2017 at 3:49 PM, Arkady <arkady.miasnikov@gmail.com> wrote:
> I have figured it out. The following solves the problem
>
> export SYSTEMTAP_DEBUGINFO_PATH=$PWD/./usr/lib/debug/lib/modules/2.6.32-71.7.1.el6.x86_64
>
>
>
> On Wed, Mar 1, 2017 at 2:37 PM, Arkady <arkady.miasnikov@gmail.com> wrote:
>> Another piece of information. When running with verbose output among
>> other things I am getting
>>
>> Created temporary directory "/tmp/stapqv5YN0"
>> Session arch: x86_64 release: 2.6.32-71.7.1.el6.x86_64
>> Parsed kernel "/home/arkady/debuginfo/./usr/src/kernels/2.6.32-71.7.1.el6.x86_64/.config",
>> containing 2952 tuples
>> Parsed kernel "/home/arkady/debuginfo/./usr/src/kernels/2.6.32-71.7.1.el6.x86_64/Module.symvers",
>> containing 5083 vmlinux exports
>> Parsed kernel "/home/arkady/debuginfo/./usr/src/kernels/2.6.32-71.7.1.el6.x86_64/System.map",
>> containing 25650 symbols
>> Processing tapset "/usr/share/systemtap/tapset/linux/context.stpm"
>> ......
>> Searched: "/usr/share/systemtap/tapset/*.stp", found: 26, processed: 26
>> Processing tapset "/home/arkady/agent/LinuxAgent/tapset/dentry.stp"
>> Processing tapset "/home/arkady/agent/LinuxAgent/tapset/sysfs.stp"
>> Processing tapset "/home/arkady/agent/LinuxAgent/tapset/task.stp"
>> Searched: "/home/arkady/agent/LinuxAgent/tapset/*.stp", found: 3, processed: 3
>> Pass 1: parsed user script and 114 library script(s) using
>> 207088virt/34908res/3232shr/32000data kb, in 200usr/30sys/224real ms.
>> Attempting to extract kernel debuginfo build ID from
>> /home/arkady/debuginfo/./usr/src/kernels/2.6.32-71.7.1.el6.x86_64/vmlinux.id
>>
>>
>>
>> On Wed, Mar 1, 2017 at 1:20 PM, Arkady <arkady.miasnikov@gmail.com> wrote:
>>> Hi,
>>>
>>> I am trying to create a build environment for generating the kernel
>>> modules for other computers. My goal is to have a chroot with multiple
>>> kernel-devel/debuginfo packages.
>>> I started by following
>>> https://sourceware.org/systemtap/SystemTap_Beginners_Guide/cross-compiling.html
>>> I downloaded and installed packages for 2.6.32-71.7.1.el6.x86_64 (a
>>> random pick of the kernel) manually using
>>>
>>> rpm --force  -ivh  kernel-debuginfo-2.6.32-71.7.1.el6.x86_64.rpm
>>> kernel-debuginfo-common-x86_64-2.6.32-71.7.1.el6.x86_64.rpm
>>> kernel-devel-2.6.32-71.7.1.el6.x86_64.rpm
>>>
>>> After that I tried
>>>
>>> stap -r 2.6.32-71.7.1.el6.x86_64 -p4 <script_name>.stp
>>>
>>> I am getting
>>>
>>> semantic error: missing x86_64 kernel/module debuginfo [man
>>> warning::debuginfo] under
>>> '/home/arkady/debuginfo/usr/src/kernels/2.6.32-71.7.1.el6.x86_64'
>>>
>>> I tried to specify --root in the command to rpm and avoid --force this
>>> way. STAP command is
>>> stap -r <root here>/usr/src/kernels/2.6.32-71.7.1.el6.x86_64 -p4
>>> <script_name>.stp
>>>
>>> It did not solve the problem. This is how my
>>> usr/src/kernels/2.6.32-71.7.1.el6.x86_64/ looks like
>>>
>>> Makefile   Module.symvers  arch   crypto   firmware  include  ipc
>>> lib  net      scripts   sound  usr Makefile.common  System.map
>>> block  drivers  fs        init     kernel  mm   samples  security
>>> tools  virt
>>>
>>> and /usr/src/kernels/2.6.32-642.el6.x86_64/kernel/
>>>
>>> Kconfig.freezer  Kconfig.hz  Kconfig.preempt  Makefile  events  gcov
>>> irq  power  time  trace
>>>
>>> I went on to the file dwflpp.cxx and tried to figure out what is
>>> missing - my theory was that some symlink can solve the problem. From
>>> the source code it appears that dwfl_module_getdwarf() fails to parse
>>> the module (or found it).
>>>
>>> What module?
>>>
>>> Thank you, Arkady.

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

end of thread, other threads:[~2017-03-01 13:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-01 11:21 Generating Instrumentation for Other Computers Arkady
2017-03-01 12:37 ` Arkady
2017-03-01 13:49   ` Arkady
2017-03-01 13:52     ` Arkady

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 read-only IMAP folder(s) and NNTP newsgroup(s).