Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
Forum Topic - Profiling network driver: (5 Items)
   
Profiling network driver  
Hi,

1) Is there a way to profile the network driver itself? If yes, then how?(Since network driver is itself used for host-
target 
communication)? Is there any documentation on how to do sych a thing?

2) My driver builds & works fine. However, I run into following compilation error when I try to build my driver with 
profiling information (-p). Any help?

/opt/qnx632/target/qnx6/mipsbe/lib/libcS.a(mcount.o): In function `_mcount_':
mcount.o(.text+0x48): undefined reference to `_gmonparam'

I'm using 6.3.2.

Thanks,

Rajat
RE: Profiling network driver  
I seem to remember there being some sort of problem a while ago when I tried
to profile a shared object in the stack, but that may well have been fixed
with the newest tools / libs on 6.3.2, so give it a shot.

In any case, this requires two network interfaces on your target.  You run
one instance of io-net with one interface and start up a second instance of
io-net using the second interface from the IDE.  Take a look at the TCP/IP
Networking section of the docs. It's got a subsection "Running Multiple
instances of the TCP/IP Stack" that shows how to set up and use multiple
stacks.

I believe that you also have to link with the -p option in order to get the
correct libs linked in.

From the docs:

"To build a Standard Make C/C++ project for profiling, compile and link
using the -p option. For example, your Makefile might have a line like this:

CFLAGS=-p CXXFLAGS=-p LDFLAGS=-p"


	Hope that helps,
		Robert.


-----Original Message-----
From: Rajat Jain [mailto:rajat.jain@infogain.com] 
Sent: Monday, December 17, 2007 11:09 PM
To: drivers-networking
Subject: Profiling network driver

Hi,

1) Is there a way to profile the network driver itself? If yes, then
how?(Since network driver is itself used for host-target 
communication)? Is there any documentation on how to do sych a thing?

2) My driver builds & works fine. However, I run into following compilation
error when I try to build my driver with 
profiling information (-p). Any help?

/opt/qnx632/target/qnx6/mipsbe/lib/libcS.a(mcount.o): In function
`_mcount_':
mcount.o(.text+0x48): undefined reference to `_gmonparam'

I'm using 6.3.2.

Thanks,

Rajat


_______________________________________________
Networking Drivers
http://community.qnx.com/sf/go/post3859
RE: Profiling network driver  
Hi Robert,

Thanks for the help. The information was very useful.

> In any case, this requires two network interfaces on your target. 
> You run one instance of io-net with one interface and start up a
> second instance of io-net using the second interface from the IDE. 

Can you please elaborate on how to start-up second instance of io-net from IDE (to profile network driver)? 

1) I'm new to IDE and have till now done basic application profiling (of executables). However, I'm not sure on how to 
proceed for shared object profiling? Any documentation / how-to etc will be highly appreciated.

2) Do I need to import & build the source code of an executable (io-net) to profile a shared object (network driver)?

3) I have so far imported the code of the BSP (including the 2 network drivers for 2 network interfaces on board). So to profile driver 2, do I run application profiler on io-net?

Any pointers are welcome.

Thanks,

Rajat

> 
> 
> -----Original Message-----
> From: Rajat Jain [mailto:rajat.jain@infogain.com]
> Sent: Monday, December 17, 2007 11:09 PM
> To: drivers-networking
> Subject: Profiling network driver
> 
> Hi,
> 
> 1) Is there a way to profile the network driver itself? If yes, then
> how?(Since network driver is itself used for host-target
> communication)? Is there any documentation on how to do sych a thing?
> 
> 2) My driver builds & works fine. However, I run into following
> compilation error when I try to build my driver with
> profiling information (-p). Any help?
> 
> /opt/qnx632/target/qnx6/mipsbe/lib/libcS.a(mcount.o): In function
> `_mcount_':
> mcount.o(.text+0x48): undefined reference to `_gmonparam'
> 
> I'm using 6.3.2.
> 
> Thanks,
> 
> Rajat
> 
> 
> _______________________________________________
> Networking Drivers
> http://community.qnx.com/sf/go/post3859
> 
> _______________________________________________
> Networking Drivers
> http://community.qnx.com/sf/go/post3881
RE: Profiling network driver  
Hi Rajat:
	For some reason, I'd assumed that you were already using the IDE.
You certainly don't HAVE to use the IDE if you're not already doing so.  If
you DO want to use the IDE, then I would indeed recommend building the
driver source inside of the IDE since it takes care of a lot of the details
associated with doing the profiling.  

The IDE docs already cover most of what you have to do to get profiling to
work with applications, so I'd recommend you start there.

Given that I have the io-net source internally, I've usually built it and
used that to run things against, but I don't believe that you have to.  I
suspect that the easiest way to do this would be to copy the io-net binary
into your driver project (where it will show up as a binary) and then create
a launch configuration that runs io-net with the appropriate options to pull
in the driver (you can download it on to the target into /tmp and use the
-d/tmp/devn.xxx.so option to load it into io-net) and with the profiling
tool enabled.  

I will admit at this point that I haven't done things quite like this to
date with a stock io-net binary, but I believe that it should work.
	Robert.

-----Original Message-----
From: Rajat Jain [mailto:rajat.jain@infogain.com] 
Sent: Tuesday, December 18, 2007 11:46 PM
To: drivers-networking
Subject: RE: Profiling network driver


Hi Robert,

Thanks for the help. The information was very useful.

> In any case, this requires two network interfaces on your target. 
> You run one instance of io-net with one interface and start up a
> second instance of io-net using the second interface from the IDE. 

Can you please elaborate on how to start-up second instance of io-net from
IDE (to profile network driver)? 

1) I'm new to IDE and have till now done basic application profiling (of
executables). However, I'm not sure on how to proceed for shared object
profiling? Any documentation / how-to etc will be highly appreciated.

2) Do I need to import & build the source code of an executable (io-net) to
profile a shared object (network driver)?

3) I have so far imported the code of the BSP (including the 2 network
drivers for 2 network interfaces on board). So to profile driver 2, do I run
application profiler on io-net?

Any pointers are welcome.

Thanks,

Rajat

> 
> 
> -----Original Message-----
> From: Rajat Jain [mailto:rajat.jain@infogain.com]
> Sent: Monday, December 17, 2007 11:09 PM
> To: drivers-networking
> Subject: Profiling network driver
> 
> Hi,
> 
> 1) Is there a way to profile the network driver itself? If yes, then
> how?(Since network driver is itself used for host-target
> communication)? Is there any documentation on how to do sych a thing?
> 
> 2) My driver builds & works fine. However, I run into following
> compilation error when I try to build my driver with
> profiling information (-p). Any help?
> 
> /opt/qnx632/target/qnx6/mipsbe/lib/libcS.a(mcount.o): In function
> `_mcount_':
> mcount.o(.text+0x48): undefined reference to `_gmonparam'
> 
> I'm using 6.3.2.
> 
> Thanks,
> 
> Rajat
> 
> 
> _______________________________________________
> Networking Drivers
> http://community.qnx.com/sf/go/post3859
> 
> _______________________________________________
> Networking Drivers
> http://community.qnx.com/sf/go/post3881


_______________________________________________
Networking Drivers
http://community.qnx.com/sf/go/post3891
RE: Profiling network driver  
Hi Robert,

Thank you very much for the help. I'll try out your suggestions.

Regards,

Rajat


Robert Craig wrote:
> Hi Rajat:
> 	For some reason, I'd assumed that you were already using the IDE.
> You certainly don't HAVE to use the IDE if you're not already doing
> so.  If you DO want to use the IDE, then I would indeed recommend
> building the driver source inside of the IDE since it takes care of a
> lot of the details associated with doing the profiling.
> 
> The IDE docs already cover most of what you have to do to get
> profiling to work with applications, so I'd recommend you start there.
> 
> Given that I have the io-net source internally, I've usually built it
> and used that to run things against, but I don't believe that you
> have to.  I suspect that the easiest way to do this would be to copy
> the io-net binary into your driver project (where it will show up as
> a binary) and then create a launch configuration that runs io-net
> with the appropriate options to pull in the driver (you can download
> it on to the target into /tmp and use the -d/tmp/devn.xxx.so option
> to load it into io-net) and with the profiling tool enabled.
> 
> I will admit at this point that I haven't done things quite like this
> to date with a stock io-net binary, but I believe that it should work.
> 	Robert.
> 
> -----Original Message-----
> From: Rajat Jain [mailto:rajat.jain@infogain.com]
> Sent: Tuesday, December 18, 2007 11:46 PM
> To: drivers-networking
> Subject: RE: Profiling network driver
> 
> 
> Hi Robert,
> 
> Thanks for the help. The information was very useful.
> 
>> In any case, this requires two network interfaces on your target.
>> You run one instance of io-net with one interface and start up a
>> second instance of io-net using the second interface from the IDE.
> 
> Can you please elaborate on how to start-up second instance of io-net
> from IDE (to profile network driver)?
> 
> 1) I'm new to IDE and have till now done basic application profiling
> (of executables). However, I'm not sure on how to proceed for shared
> object profiling? Any documentation / how-to etc will be highly
> appreciated. 
> 
> 2) Do I need to import & build the source code of an executable
> (io-net) to profile a shared object (network driver)?
> 
> 3) I have so far imported the code of the BSP (including the 2 network
> drivers for 2 network interfaces on board). So to profile driver 2,
> do I run application profiler on io-net?
> 
> Any pointers are welcome.
> 
> Thanks,
> 
> Rajat
> 
>> 
>> 
>> -----Original Message-----
>> From: Rajat Jain [mailto:rajat.jain@infogain.com]
>> Sent: Monday, December 17, 2007 11:09 PM
>> To: drivers-networking
>> Subject: Profiling network driver
>> 
>> Hi,
>> 
>> 1) Is there a way to profile the network driver itself? If yes, then
>> how?(Since network driver is itself used for host-target
>> communication)? Is there any documentation on how to do sych a thing?
>> 
>> 2) My driver builds & works fine. However, I run into following
>> compilation error when I try to build my driver with
>> profiling information (-p). Any help?
>> 
>> /opt/qnx632/target/qnx6/mipsbe/lib/libcS.a(mcount.o): In function
>> `_mcount_': mcount.o(.text+0x48): undefined reference to `_gmonparam'
>> 
>> I'm using 6.3.2.
>> 
>> Thanks,
>> 
>> Rajat
>> 
>> 
>> _______________________________________________
>> Networking Drivers
>> http://community.qnx.com/sf/go/post3859
>> 
>> _______________________________________________
>> Networking...