BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

SamplingProfiler 1.2 posted to attachments
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Language BASM
View previous topic :: View next topic  
Author Message
Eric Grange
Guest





PostPosted: Mon Oct 17, 2005 4:31 pm    Post subject: SamplingProfiler 1.2 posted to attachments Reply with 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
Pierre le Riche
Guest





PostPosted: Mon Oct 17, 2005 5:51 pm    Post subject: Re: SamplingProfiler 1.2 posted to attachments Reply with quote



Thanks Eric,

I think it's a great utility. I use it to tune all my Fastcode entries Smile.

Regards,
Pierre


Back to top
Nils Haeck
Guest





PostPosted: Mon Oct 17, 2005 6:16 pm    Post subject: Re: SamplingProfiler 1.2 posted to attachments Reply with quote



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





PostPosted: Mon Oct 17, 2005 9:13 pm    Post subject: Re: SamplingProfiler 1.2 posted to attachments Reply with quote

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





PostPosted: Mon Oct 17, 2005 9:57 pm    Post subject: Re: SamplingProfiler 1.2 posted to attachments Reply with quote

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





PostPosted: Tue Oct 18, 2005 8:09 am    Post subject: Re: SamplingProfiler 1.2 posted to attachments Reply with quote

Eric Grange wrote:

Quote:
- Support environment variables macros in paths.

Works great.

Thank you.

Cheers,
Adem

Back to top
Ain Valtin
Guest





PostPosted: Tue Oct 18, 2005 8:56 am    Post subject: Re: SamplingProfiler 1.2 posted to attachments Reply with quote

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





PostPosted: Tue Oct 18, 2005 1:03 pm    Post subject: Re: SamplingProfiler 1.2 posted to attachments Reply with quote

Quote:
I think it's a great utility. I use it to tune all my Fastcode entries Smile.

Thanks Smile
Reminds me I forgot to update the credits, since this version
now uses FastMM ;)

Eric

Back to top
Eric Grange
Guest





PostPosted: Tue Oct 18, 2005 1:13 pm    Post subject: Re: SamplingProfiler 1.2 posted to attachments Reply with quote

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





PostPosted: Tue Oct 18, 2005 1:23 pm    Post subject: Re: SamplingProfiler 1.2 posted to attachments Reply with quote

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





PostPosted: Tue Oct 18, 2005 9:28 pm    Post subject: Re: SamplingProfiler 1.2 posted to attachments Reply with quote

Sounds like a "chicken and egg" paradigm Smile 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
Smile.

Thanks Smile
Reminds me I forgot to update the credits, since this version
now uses FastMM ;)

Eric



Back to top
Eric Grange
Guest





PostPosted: Wed Oct 19, 2005 7:55 am    Post subject: Re: SamplingProfiler 1.2 posted to attachments Reply with quote

Quote:
Sounds like a "chicken and egg" paradigm Smile FastMM uses SamplingProfiler to
get faster, and SamplingProfiler uses FastMM to get better.. interesting Smile

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





PostPosted: Wed Oct 19, 2005 8:25 am    Post subject: Re: SamplingProfiler 1.2 posted to attachments Reply with quote

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





PostPosted: Wed Oct 19, 2005 10:08 am    Post subject: Re: SamplingProfiler 1.2 posted to attachments Reply with quote

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





PostPosted: Wed Oct 19, 2005 11:11 am    Post subject: Re: SamplingProfiler 1.2 posted to attachments Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Language BASM All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.