473,405 Members | 2,334 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

How does sampling Profiler work?

Hi,

I am curious that how sampling profiler works.
How can a program(profiler) know the running detailis of another program?

I googled this topic and not much info is got. Is there anybody get some
insight about it?

Thanks & Regards,
Jul 23 '05 #1
1 2090
On Mon, 27 Jun 2005 19:17:38 +0800, Morgan Cheng <mo***@nospam.nospam>
wrote:
Hi,

I am curious that how sampling profiler works.
How can a program(profiler) know the running detailis of another program?

I googled this topic and not much info is got. Is there anybody get some
insight about it?


Basically, you use a second process to examine what's happening in the
first process.

The obvious way to do this is to get your OS kernel to examine process
1 during timer interrupts. The timer interrupts process 1 regularly
(say, 50 or 100 times a second). The kernel records where the PC was
in process 1, storing the result in an array, before returning control
to process 1. When process 1 completes, the profiler gets this array
from the kernel, and translates the PC addresses into locations in the
source program using process 1's symbol table. Look up Unix's
profile() (I think that's right - I forget what the exact name is)
system call.

Easy!

AL

Jul 23 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Irmen de Jong | last post by:
Hi, when using the hotshot profiler, I can see no difference in the measurement of a function that is busy eating CPU cycles, and a function that is blocking/waiting on IO (or sleeping)... For...
1
by: steflhermitte | last post by:
Dear cpp-ians, I want to apply a stratified sampling on an image. Following simplified example will explain my problem. The original image I with nrows and ncols is now a vector V of length...
4
by: kenfar | last post by:
I've got a large table on db2 8.2.1 that I rarely perform runstats on. It has about 600 million rows organized in a single MDC time dimension on a non-dpf warehouse. Anyhow, we recently ran...
4
by: Steve | last post by:
Hi I am working on a web application which will be accessed by thousands of visitors per day, so speed and performance is crucial to the application. One of the business logic classes in my...
3
by: Sam Samson | last post by:
Can any-one recommend some good sites detailing how to code a simple memory profiler? How do they "look under the hood"? I built an uber simple service that tracks the process' memory but I need...
0
by: =?Utf-8?B?QW50?= | last post by:
Hi, I'm trying to use profiler with Web Developer 2005 express. I set it up in my & it won't work. I get an erro saying the object is not set. I did a quick search which said I need to run...
0
by: anweshadash | last post by:
Using SQL Profiler: (Ref: http://msdn2.microsoft.com/en-us/library/ms181091.aspx) Sometimes it’s very beneficial to use sql profiler. Let’s have an idea about that and how to use that by...
0
by: Matei Zaharia | last post by:
I'm looking for a sampling profiler which I can attach to a running Python process without modifying the source code or affecting performance. So far I've only seen references to...
3
by: wizche | last post by:
Hi Everybody, I'm trying to play a little with waveIn functions... My goal is to calculate if I'm listening a specified sin frequency or not. For this reason I'm going down with the...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.