 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Eric Grange Guest
|
Posted: Mon Oct 17, 2005 4:31 pm Post subject: SamplingProfiler 1.2 posted to attachments |
|
|
Version changes:
- View/compare multiple profiling runs (results now tabbed).
- Save and reload profiling runs results.
- Support environment variables macros in paths.
Didn't test saving/reloading profiling runs much though, I don't
anticipate anything going horribly wrong, but who knows? :)
There isn't much yet in the way of documenting exactly what was
profiled and on which hardware for saved runs... may come later.
Viewing saved run results shouldn't require any access to
TD32/MAP/(Z)JDBG info, only profiling does require one of them
(if you want detailed info).
Eric
|
|
| Back to top |
|
 |
Pierre le Riche Guest
|
Posted: Mon Oct 17, 2005 5:51 pm Post subject: Re: SamplingProfiler 1.2 posted to attachments |
|
|
Thanks Eric,
I think it's a great utility. I use it to tune all my Fastcode entries .
Regards,
Pierre
|
|
| Back to top |
|
 |
Nils Haeck Guest
|
Posted: Mon Oct 17, 2005 6:16 pm Post subject: Re: SamplingProfiler 1.2 posted to attachments |
|
|
Hello Eric,
I also want to express my sincere thanks for this great profiler. It is very
helpful to have such an utility, that is basically independent of my exe,
yet still gives powerful insight in where the bottlenecks are. Since I
accidentally spotted it 2 weeks ago, I'm using it almost daily.
Nils
"Eric Grange" <egrangeNO (AT) SPAMglscene (DOT) org> schreef in bericht
news:4353d001 (AT) newsgroups (DOT) borland.com...
| Quote: | Version changes:
- View/compare multiple profiling runs (results now tabbed).
- Save and reload profiling runs results.
- Support environment variables macros in paths.
Didn't test saving/reloading profiling runs much though, I don't
anticipate anything going horribly wrong, but who knows? :)
There isn't much yet in the way of documenting exactly what was
profiled and on which hardware for saved runs... may come later.
Viewing saved run results shouldn't require any access to
TD32/MAP/(Z)JDBG info, only profiling does require one of them
(if you want detailed info).
Eric
|
|
|
| Back to top |
|
 |
Jan Derk Guest
|
Posted: Mon Oct 17, 2005 9:13 pm Post subject: Re: SamplingProfiler 1.2 posted to attachments |
|
|
This profiler is indeed very powerful and user friendly. A rare
combination. Many thanks from me too.
Not sure if it is even possible, but how hard would it be to let it
profile threads too?
My most demanding code is performed in threads. And while the
OutputDebugString method works fine to profile a single thread, it
would be so nice if the main thread and other threads were profiled all
at the same time.
Jan Derk
|
|
| Back to top |
|
 |
Jeremy Darling Guest
|
Posted: Mon Oct 17, 2005 9:57 pm Post subject: Re: SamplingProfiler 1.2 posted to attachments |
|
|
Haven't had a chance to take a look at it yet, but thanks anways Eric. If
its 1/2 as good as usual then it will be twice as good as the rest :)
Jeremy
"Eric Grange" <egrangeNO (AT) SPAMglscene (DOT) org> wrote
| Quote: | Version changes:
- View/compare multiple profiling runs (results now tabbed).
- Save and reload profiling runs results.
- Support environment variables macros in paths.
Didn't test saving/reloading profiling runs much though, I don't
anticipate anything going horribly wrong, but who knows? :)
There isn't much yet in the way of documenting exactly what was
profiled and on which hardware for saved runs... may come later.
Viewing saved run results shouldn't require any access to
TD32/MAP/(Z)JDBG info, only profiling does require one of them
(if you want detailed info).
Eric
|
|
|
| Back to top |
|
 |
Adem Guest
|
Posted: Tue Oct 18, 2005 8:09 am Post subject: Re: SamplingProfiler 1.2 posted to attachments |
|
|
Eric Grange wrote:
| Quote: | - Support environment variables macros in paths.
|
Works great.
Thank you.
Cheers,
Adem
|
|
| Back to top |
|
 |
Ain Valtin Guest
|
Posted: Tue Oct 18, 2005 8:56 am Post subject: Re: SamplingProfiler 1.2 posted to attachments |
|
|
On Mon, 17 Oct 2005 18:31:24 +0200, Eric Grange
<egrangeNO (AT) SPAMglscene (DOT) org> wrote:
| Quote: | - View/compare multiple profiling runs (results now tabbed).
- Save and reload profiling runs results.
- Support environment variables macros in paths.
|
Thanks!
| Quote: | There isn't much yet in the way of documenting exactly what was
profiled and on which hardware for saved runs... may come later.
|
Here is some more ideas in case you should have some free time <eg>
- ability to use embedded JDBG info
- silent mode. ie one can create shortcut to SP with two parameters,
prg to profile and log filename. When launched via this shortcut SP
only shows up in system tray and log file would be updated on each run
allowing to gather profiling data over many runs.
ain
|
|
| Back to top |
|
 |
Eric Grange Guest
|
Posted: Tue Oct 18, 2005 1:03 pm Post subject: Re: SamplingProfiler 1.2 posted to attachments |
|
|
| Quote: | I think it's a great utility. I use it to tune all my Fastcode entries .
|
Thanks
Reminds me I forgot to update the credits, since this version
now uses FastMM ;)
Eric
|
|
| Back to top |
|
 |
Eric Grange Guest
|
Posted: Tue Oct 18, 2005 1:13 pm Post subject: Re: SamplingProfiler 1.2 posted to attachments |
|
|
| Quote: | Not sure if it is even possible, but how hard would it be to let it
profile threads too?
|
I've looked into it but haven't found a way to know which thread of a
process was getting executed before you suspend the process.
So all I would be able to do so far would be to check what all threads
are executing, and then take a sample for each... but the results would
be just as incorrect as those of an instrumenting profiler, for instance
if you have:
Thread A starts function X
Thread B starts function Y
... 10 seconds passes...
Thread A ends function X
Thread B ends function Y
then you would get 10 seconds for function X and Y, while in practice,
thread A may not have used more than 1 second of CPU time, but has been
slowed down by thread B (because of thread priorities, synchronization,
whatever..).
Depending on the actual precision offered by GetThreadTimes, there may
be a way to guesstimate which threads actually did some work since the
last sampling (and were not just standing still because of scheduling
bad luck), but I haven't investigated it yet.
Eric
|
|
| Back to top |
|
 |
Eric Grange Guest
|
Posted: Tue Oct 18, 2005 1:23 pm Post subject: Re: SamplingProfiler 1.2 posted to attachments |
|
|
| Quote: | - ability to use embedded JDBG info
|
Was planning for it, but how its embedded isn't really documented, and I
haven't had time yet to reverse engineer the JCL code to know exactly
how the JDBG is stored (looks like as a regular resource, but when I
tried to stream it from the resource, it failed, haven't tried again since).
| Quote: | - silent mode. ie one can create shortcut to SP with two parameters,
prg to profile and log filename. When launched via this shortcut SP
only shows up in system tray and log file would be updated on each run
allowing to gather profiling data over many runs.
|
Will add it to the list :)
Eric
|
|
| Back to top |
|
 |
Nils Haeck Guest
|
Posted: Tue Oct 18, 2005 9:28 pm Post subject: Re: SamplingProfiler 1.2 posted to attachments |
|
|
Sounds like a "chicken and egg" paradigm FastMM uses SamplingProfiler to
get faster, and SamplingProfiler uses FastMM to get better.. interesting :)
Nils
"Eric Grange" <egrangeNO (AT) SPAMglscene (DOT) org> wrote
| Quote: | I think it's a great utility. I use it to tune all my Fastcode entries
.
Thanks
Reminds me I forgot to update the credits, since this version
now uses FastMM ;)
Eric
|
|
|
| Back to top |
|
 |
Eric Grange Guest
|
Posted: Wed Oct 19, 2005 7:55 am Post subject: Re: SamplingProfiler 1.2 posted to attachments |
|
|
| Quote: | Sounds like a "chicken and egg" paradigm FastMM uses SamplingProfiler to
get faster, and SamplingProfiler uses FastMM to get better.. interesting
|
Can't use SamplingProfiler to profile SamplingProfiler profiling phase
though, so the loop isn't complete ;)
(something about a debugging a debugging debugger results in an
'external exception' from the OS)
Eric
|
|
| Back to top |
|
 |
Asseri Lintanen Guest
|
Posted: Wed Oct 19, 2005 8:25 am Post subject: Re: SamplingProfiler 1.2 posted to attachments |
|
|
Great utility, had much fun inspecting a few of my projects, thanks alot
:)
Only, i got a directory issue with it...
I tend to organize my projects as follows:
..dpr file in "projectname" folder
..exe in "projectnamerelease"
..pas in "projectnamesources"
....same for some other filetypes, media and so on...
Now, when i start sampling the .exe it i get "projectname" as the
current running directory inside my application when it starts, when i
normally should get "projectnamerelease" (the .exe does reside in
there so...) this stops the project from loading at all because i have
files under projectnamerelease that i refer to and need in the
application.
I can resolve it by moving the built app and subdirs to the project root
so i can start having fun and sampling my stuff, it's just inconvinient.
Great application though, the sampler :)
Regards,
Asseri Lintanen
|
|
| Back to top |
|
 |
Ain Valtin Guest
|
Posted: Wed Oct 19, 2005 10:08 am Post subject: Re: SamplingProfiler 1.2 posted to attachments |
|
|
On Wed, 19 Oct 2005 11:25:32 +0300, Asseri Lintanen
<asseridotlintanenatnetsonicdotfi> wrote:
| Quote: | Now, when i start sampling the .exe it i get "projectname" as the
current running directory inside my application when it starts, when i
normally should get "projectnamerelease" (the .exe does reside in
there so...) this stops the project from loading at all because i have
files under projectnamerelease that i refer to and need in the
application.
|
Well, IMO SP has helped you to find another bug in your software.
Never assume current dir! If you want to refer files in the same dir
as the exe then use something like
ExtractFilePath(Application.ExeName)
ain
|
|
| Back to top |
|
 |
Anders Isaksson Guest
|
Posted: Wed Oct 19, 2005 11:11 am Post subject: Re: SamplingProfiler 1.2 posted to attachments |
|
|
On Wed, 19 Oct 2005 11:25:32 +0300, Asseri Lintanen
<asseridotlintanenatnetsonicdotfi> wrote:
| Quote: |
Now, when i start sampling the .exe it i get "projectname" as the
current running directory inside my application when it starts, when i
normally should get "projectnamerelease" (the .exe does reside in
there so...)
|
Never, ever, assume anything about 'current directory'! When your
program is started by a shortcut (or CreateProcess) there are no
guarantees that 'current directory' is set as you wish. If you want to
locate files that should be in the same directory as the .exe use
ExtractFilePath(Application.ExeName) to get the path.
--
Anders Isaksson, Sweden
BlockCAD: http://web.telia.com/~u16122508/proglego.htm
Gallery: http://web.telia.com/~u16122508/gallery/index.htm
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|