How to profile in REAL time (not process-virtual time)

How to profile in REAL time (not process-virtual time)

Post by Seth Goldber » Sat, 08 Jul 2000 04:00:00



Hi,

  Does anyone know of a way to use the GNU profiler using REAL time
and not just process virtual time?  The reason is, that I want to see
the time some functions are blocking (waiting for file locking to
go through), and the current profiler output only lists time in
the actual process.

  Thanks,
  Seth

  sethg.vcf
< 1K Download
 
 
 

How to profile in REAL time (not process-virtual time)

Post by Kaz Kylhe » Sat, 08 Jul 2000 04:00:00



>This is a multi-part message in MIME format.
>--------------CD8D48A48A62D475CCE8F37F
>Content-Type: text/plain; charset=us-ascii
>Content-Transfer-Encoding: 7bit

>Hi,

>  Does anyone know of a way to use the GNU profiler using REAL time
>and not just process virtual time?  The reason is, that I want to see
>the time some functions are blocking (waiting for file locking to
>go through), and the current profiler output only lists time in
>the actual process.

That's what profiling is for; for seeing CPU usage. To do real time profiling,
use a hardware clock, like what is read by the ``rdtsc'' instruction on
Pentiums and some 486es. With the time-stamp counter, you can get a fine
grained measurement of how much time elapsed between two points in the
execution of the program.

The gettimeofday() system call will use the instruction if it's available;
however it takes time to make the system call; for greater accuracy you want
the instruction to be embedded in some inline code.

I'd make an abstract time-stamp counter class that can be implemented in
various ways depending on what is available, and which can be turned off
when not instrumenting.

>  Thanks,
>  Seth
>--------------CD8D48A48A62D475CCE8F37F
>Content-Type: text/x-vcard; charset=us-ascii;
> name="sethg.vcf"
>Content-Transfer-Encoding: 7bit
>Content-Description: Card for Seth Goldberg
>Content-Disposition: attachment;
> filename="sethg.vcf"

>begin:vcard
>n:Goldberg;Seth
>tel;pager:800.309.2536
>tel;cell:408.390.0466
>tel;fax:408.517.5539
>tel;work:408.517.5426
>x-mozilla-html:FALSE
>url:http://www.sun.com
>org:Sun Microsystems, Inc.;Strategic Partnerships
>version:2.1

>title:Senior Systems Engineer
>adr;quoted-printable:;;20450 Stevens Creek Boulevard=0D=0AMS CUP03-403;Cupertino;California;95014;USA
>fn:Seth Goldberg
>end:vcard

Would you mind turning that off when posting to Usenet discussion groups?
Proper etiquette calls for signature lines that are no longer than four
lines, and for the avoidance of MIME attachments.

--
#exclude <windows.h>

 
 
 

How to profile in REAL time (not process-virtual time)

Post by cLIeNUX us » Mon, 10 Jul 2000 04:00:00




>>This is a multi-part message in MIME format.
>>--------------CD8D48A48A62D475CCE8F37F
>>Content-Type: text/plain; charset=us-ascii
>>Content-Transfer-Encoding: 7bit

>>Hi,

>>  Does anyone know of a way to use the GNU profiler using REAL time
>>and not just process virtual time?  The reason is, that I want to see
>>the time some functions are blocking (waiting for file locking to
>>go through), and the current profiler output only lists time in
>>the actual process.

>That's what profiling is for; for seeing CPU usage. To do real time profiling,
>use a hardware clock, like what is read by the ``rdtsc'' instruction on
>Pentiums and some 486es. With the time-stamp counter, you can get a fine
>grained measurement of how much time elapsed between two points in the
>execution of the program.

>The gettimeofday() system call will use the instruction if it's available;
>however it takes time to make the system call; for greater accuracy you want
>the instruction to be embedded in some inline code.

>I'd make an abstract time-stamp counter class that can be implemented in
>various ways depending on what is available, and which can be turned off
>when not instrumenting.

"REAL" in all caps means rtlinux. It can turn Linux on and off at will at
any periodicity or one-shot. It runs Linux as it's idle task. How you look
at a particular program from it is LAAETTR.

Rick Hohensee

- Show quoted text -

>>  Thanks,
>>  Seth
>>--------------CD8D48A48A62D475CCE8F37F
>>Content-Type: text/x-vcard; charset=us-ascii;
>> name="sethg.vcf"
>>Content-Transfer-Encoding: 7bit
>>Content-Description: Card for Seth Goldberg
>>Content-Disposition: attachment;
>> filename="sethg.vcf"

>>begin:vcard
>>n:Goldberg;Seth
>>tel;pager:800.309.2536
>>tel;cell:408.390.0466
>>tel;fax:408.517.5539
>>tel;work:408.517.5426
>>x-mozilla-html:FALSE
>>url:http://www.sun.com
>>org:Sun Microsystems, Inc.;Strategic Partnerships
>>version:2.1

>>title:Senior Systems Engineer
>>adr;quoted-printable:;;20450 Stevens Creek Boulevard=0D=0AMS CUP03-403;Cupertino;California;95014;USA
>>fn:Seth Goldberg
>>end:vcard

>Would you mind turning that off when posting to Usenet discussion groups?
>Proper etiquette calls for signature lines that are no longer than four
>lines, and for the avoidance of MIME attachments.

>--
>#exclude <windows.h>

 
 
 

1. Real-time (RT) process slipping time - any ideas?

I have a 4-CPU sun server. Exactly one process is a real-time (RT) process.
Many other processes (non-RT) feed it work. The RT process occasionally does
not wake up as fast as needed. Time drifts spoil the real-time output of the
RT process. I have raised the time quantum of the RT process to the max.
Also its priority (but that shouldn't matter since there are no other RT
processes.)

Any ideas on how to tighten the RT process?

2. i386 vs i586 kernels (RedHat 6.0)

3. Real-time process not swappable ?

4. WinTV

5. convert UT time in local time / local time in UT time

6. how do I check with cvs if files from my source tree got modded?

7. time time time how can I tell the time

8. printcap & filter for hp4p

9. profiling real time code. how to do it?

10. Real time profiling tool

11. "Real-Time" Time Display in Console

12. X Server Time is REAL time of day???

13. System time warping around real time problem - please help