Go Back   Technology Questions > Software Questions > Operating System Questions > Linux

Reply
 
LinkBack Thread Tools
  #1 (permalink)  
Old 07-25-2008, 06:21 AM
Rajesh
Tablet PC Guest
 
Posts: n/a
LD_PRELOAD related question

Hi,

This question might sound weird but its a long story why I want to do
this.

I sometimes run my app with a profiling agent 'pre-loaded'. For
example:

$ env LD_PRELOAD=profiling_agent.so my_app

My question: Inside 'my_app', I want to know if 'profiling_agent.so'
is running/pre-loaded or not. Can I find out via the /proc interface?


Regards
Rajesh
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

 
Old 07-25-2008, 06:21 AM
Xploder HD Movie Player for PS3. Manage, convert and transfer media files between the PC and PS3.
  #2 (permalink)  
Old 07-25-2008, 06:21 AM
Måns Rullgård
Tablet PC Guest
 
Posts: n/a
Re: LD_PRELOAD related question

Rajesh <rajesh.radhakrishnan******.com> writes:

> Hi,
>
> This question might sound weird but its a long story why I want to do
> this.
>
> I sometimes run my app with a profiling agent 'pre-loaded'. For
> example:
>
> $ env LD_PRELOAD=profiling_agent.so my_app
>
> My question: Inside 'my_app', I want to know if 'profiling_agent.so'
> is running/pre-loaded or not. Can I find out via the /proc interface?


On Linux, /proc/self/maps should contain this information.

--
Måns Rullgård
mans@mansr.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

  #3 (permalink)  
Old 07-25-2008, 06:21 AM
Andrew Gabriel
Tablet PC Guest
 
Posts: n/a
Re: LD_PRELOAD related question

In article <d52e576d-298e-425c-870d-6aab595923bc@c58g2000hsc.googlegroups.com>,
Rajesh <rajesh.radhakrishnan******.com> writes:
> Hi,
>
> This question might sound weird but its a long story why I want to do
> this.
>
> I sometimes run my app with a profiling agent 'pre-loaded'. For
> example:
>
> $ env LD_PRELOAD=profiling_agent.so my_app
>
> My question: Inside 'my_app', I want to know if 'profiling_agent.so'
> is running/pre-loaded or not. Can I find out via the /proc interface?


[Solaris]

Much easier to just ask the dynamic linker if it loaded it...

if (dlopen("profiling_agent.so", RTLD_NOLOAD) != NULL) {
/* profiling library is already loaded */
}

--
Andrew Gabriel
[email address is not usable -- followup in the newsgroup]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Reply

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
critical updates question/and related questions and problems with casey511 Windows XP 20 03-22-2008 05:50 PM
WIndows XP home OEM, 2 part question --License related zmyr88 Windows XP 9 10-12-2007 06:10 PM
AMD Athlon 64 / Cool'n Quiet related question Ismaan Windows Vista 4 03-28-2007 05:30 AM
WMV related arun Windows Media 0 02-04-2007 10:52 AM
Windows system related question : odbc32.dll scyle Windows XP 0 01-08-2007 11:45 PM


All times are GMT -8. The time now is 01:46 PM.


2003 - 2008 All Rights Reserved. Technology Questions

SEO by vBSEO 3.1.0