Profiler? 
Author Message
 Profiler?

   Well, I just opened my VC 6.0 [ Enterprise ] project in VC.Net.  Any-who,
added a profiler configuration like I usually do based on my release
configuration, went over to setting to turn profiling on... nothing.  So I
did a little sniffing in the help files, the best I could find was:

The /PROFILE linker option has been removed. If you are using a third party
profiler that needs /PROFILE, you should instead use /FIXED:NO. In this
version, the linker will still accept /PROFILE as a synonym for /FIXED:NO.

   One of three possibilities here.  Either the profiler was removed from
VC.NET, it's only available in a version higher than professional [
denial ], or it's just been made really hard to find [ latent denial ].
Which of the previous is true?

--Jonathan Ross, _NOT_ looking forward to writing his own profiling code.



Wed, 04 Aug 2004 05:55:13 GMT  
 Profiler?
Not exactly fun, but here ya' go:
__int64 __declspec({*filter*}) __fastcall RDTSC()
        {
        _asm
                {
                //Prolog
                //push   ebp
      //mov    ebp, esp
      //sub    esp, __LOCAL_SIZE
                cpuid
                rdtsc
                //Epilog
      //mov    esp, ebp
      //pop    ebp
                ret
                }
        }

Store the results into a volatile __int64; rdtsc is a CPU
tick accurate timer, 586+. (CPUID is a serializing call
that ensures pipelining doesn't affect the timer, as I
understand it).

Quote:
>-----Original Message-----
>   Well, I just opened my VC 6.0 [ Enterprise ] project

in VC.NET.  Any-who,
Quote:
>added a profiler configuration like I usually do based on
my release
>configuration, went over to setting to turn profiling

on... nothing.  So I
Quote:
>did a little sniffing in the help files, the best I could
find was:

>The /PROFILE linker option has been removed. If you are
using a third party
>profiler that needs /PROFILE, you should instead

use /FIXED:NO. In this
Quote:
>version, the linker will still accept /PROFILE as a

synonym for /FIXED:NO.
Quote:

>   One of three possibilities here.  Either the profiler
was removed from
>VC.NET, it's only available in a version higher than
professional [
>denial ], or it's just been made really hard to find [
latent denial ].
>Which of the previous is true?

>--Jonathan Ross, _NOT_ looking forward to writing his own
profiling code.

>.



Wed, 04 Aug 2004 15:14:47 GMT  
 Profiler?
   Gah, thanks.  Wasn't expecting a present, and I didn't get you anything!
<grins>  Seriously, thanks.  Never had anyone provide me code before, I've
had one of those hard rough lives where I had to write everything myself.

   Anyway, I went to look up rdtsc since I'd never seen that instruction
before and you're correct...

3-675

INSTRUCTION SET REFERENCE

RDTSC-Read Time-Stamp Counter

...

The RDTSC instruction is not a serializing instruction. Thus, it does not
necessarily wait until

all previous instructions have been executed before reading the counter.
Similarly, subsequent

instructions may begin execution before the read operation is performed.

This instruction was introduced into the IA-32 Architecture in the Pentium
processor."

...

   The code is pretty well written out so I'll guess it's been tested and
the flag in CR4 hasn't been set to disable this (it's produce a general
protection fault if TSD is set.)  The thing I'm not so sure about is that it
claims it gives you the clock cycle count, not necessarily the time.  While
this is perfect for profiling if I wanted to get the actual time it took
could I subtract the before code value from the after code value and then
just divide by the clock speed of my CPU?  Cycles are great for testing
between two items on the same computer but as we all know [ or should ] MHZ
ain't everything.

  And once again, thanks!

--Jonathan Ross, extremely happy with his new ASM toy!
PS: Next time a new CPU comes out and I download the reference I'm going to
look at the names rather than the pneumonic.  I can't believe I almost let
this one get away from me for so {*filter*}y long!


Quote:
> Not exactly fun, but here ya' go:
> __int64 __declspec({*filter*}) __fastcall RDTSC()
> {
> _asm
> {
> //Prolog
> //push   ebp
>       //mov    ebp, esp
>       //sub    esp, __LOCAL_SIZE
> cpuid
> rdtsc
> //Epilog
>       //mov    esp, ebp
>       //pop    ebp
> ret
> }
> }

> Store the results into a volatile __int64; rdtsc is a CPU
> tick accurate timer, 586+. (CPUID is a serializing call
> that ensures pipelining doesn't affect the timer, as I
> understand it).

> >-----Original Message-----
> >   Well, I just opened my VC 6.0 [ Enterprise ] project
> in VC.NET.  Any-who,
> >added a profiler configuration like I usually do based on
> my release
> >configuration, went over to setting to turn profiling
> on... nothing.  So I
> >did a little sniffing in the help files, the best I could
> find was:

> >The /PROFILE linker option has been removed. If you are
> using a third party
> >profiler that needs /PROFILE, you should instead
> use /FIXED:NO. In this
> >version, the linker will still accept /PROFILE as a
> synonym for /FIXED:NO.

> >   One of three possibilities here.  Either the profiler
> was removed from
> >VC.NET, it's only available in a version higher than
> professional [
> >denial ], or it's just been made really hard to find [
> latent denial ].
> >Which of the previous is true?

> >--Jonathan Ross, _NOT_ looking forward to writing his own
> profiling code.

> >.



Wed, 04 Aug 2004 16:16:21 GMT  
 Profiler?

Quote:

>    One of three possibilities here.  Either the profiler was removed from
> VC.NET, it's only available in a version higher than professional [
> denial ], or it's just been made really hard to find [ latent denial ].
> Which of the previous is true?

Hi Jonathan,
  The first one is closer to true.  The profiler has been removed from all
versions of Visual Studio.  Instead of providing you with a not-so-good
profiler, we teamed up with CompuWare to give you a much better profiler
that worked for every language in Visual Studio.  You can go get it for free
here:
<http://www.compuware.com/products/numega/dps/profiler/registration.asp>

--
Cheerio!
Brandon Bray                Program Manager in the Visual C++ Compiler Team

And now a word from the lawyers: This posting is provided "AS IS" with no
warranties, and confers no rights. You assume all risk for your use. ? 2001
Microsoft Corporation. All rights reserved.



Thu, 05 Aug 2004 10:40:43 GMT  
 Profiler?
  Thanks, I just downloaded it and I hope it's fantastic!  The reason I hope
is I can't exactly get any data out of it.  My code is native and thus
apparently has some special considerations, but the closest to any help I
could get was this quote:

"See Profiling Native Code Applications in the DevPartner Profiler on-line
help for more information. "

   I search their site for a good 20 minutes without finding hide nor hair
of that specific article or the Devpartner Profiler on-line help itself.
Incase you're curious, I found that above reference at
http://www.compuware.com/products/devpartner/resources/profiler/ReadM...

--Jonathan Ross



Quote:

> >    One of three possibilities here.  Either the profiler was removed
from
> > VC.NET, it's only available in a version higher than professional [
> > denial ], or it's just been made really hard to find [ latent denial ].
> > Which of the previous is true?

> Hi Jonathan,
>   The first one is closer to true.  The profiler has been removed from all
> versions of Visual Studio.  Instead of providing you with a not-so-good
> profiler, we teamed up with CompuWare to give you a much better profiler
> that worked for every language in Visual Studio.  You can go get it for
free
> here:
> <http://www.compuware.com/products/numega/dps/profiler/registration.asp>

> --
> Cheerio!
> Brandon Bray                Program Manager in the Visual C++ Compiler
Team

> And now a word from the lawyers: This posting is provided "AS IS" with no
> warranties, and confers no rights. You assume all risk for your use. ?
2001
> Microsoft Corporation. All rights reserved.



Fri, 06 Aug 2004 00:49:17 GMT  
 Profiler?
I  wouldn't expect *too* much for the time being ;-)
I downloaded it, and any code I compile with profiling enabled emits
zillions of messages like this:
Invalid record, type SSR_UNDEFINED

and

Invalid record, type SSR_OOPS

before I get a popup window explaining that dpcl.exe has attempted to access
memory location 0x0000010, which my Win2K system considers to be an Access
Violation ;^)

Luc


Quote:
>   Thanks, I just downloaded it and I hope it's fantastic!  The reason I
hope
> is I can't exactly get any data out of it.  My code is native and thus
> apparently has some special considerations, but the closest to any help I
> could get was this quote:

> "See Profiling Native Code Applications in the DevPartner Profiler on-line
> help for more information. "

>    I search their site for a good 20 minutes without finding hide nor hair
> of that specific article or the Devpartner Profiler on-line help itself.
> Incase you're curious, I found that above reference at
> http://www.compuware.com/products/devpartner/resources/profiler/ReadM...

> --Jonathan Ross




> > >    One of three possibilities here.  Either the profiler was removed
> from
> > > VC.NET, it's only available in a version higher than professional [
> > > denial ], or it's just been made really hard to find [ latent
denial ].
> > > Which of the previous is true?

> > Hi Jonathan,
> >   The first one is closer to true.  The profiler has been removed from
all
> > versions of Visual Studio.  Instead of providing you with a not-so-good
> > profiler, we teamed up with CompuWare to give you a much better profiler
> > that worked for every language in Visual Studio.  You can go get it for
> free
> > here:
> > <http://www.compuware.com/products/numega/dps/profiler/registration.asp>

> > --
> > Cheerio!
> > Brandon Bray                Program Manager in the Visual C++ Compiler
> Team

> > And now a word from the lawyers: This posting is provided "AS IS" with
no
> > warranties, and confers no rights. You assume all risk for your use. ?
> 2001
> > Microsoft Corporation. All rights reserved.



Fri, 06 Aug 2004 05:20:41 GMT  
 Profiler?

Quote:

> The reason I hope is I can't exactly get any data out of it.  My code is
> native and thus apparently has some special considerations, but the
> closest to any help I could get was this quote: [SNIP]

The profiler does work for native code.  From a user stand-point, you really
shouldn't notice any differences.  Nevertheless, the method used for
profiling is different.  For native code, the profiler injects code into
your application.  For managed code, it samples the program on regular
intervals.

If you are having problems, you should report them as bugs to CompuWare.
Hopefully, you won't have problems. :-)

--
Cheerio!
Brandon Bray                Program Manager in the Visual C++ Compiler Team

And now a word from the lawyers: This posting is provided "AS IS" with no
warranties, and confers no rights. You assume all risk for your use. ? 2002
Microsoft Corporation. All rights reserved.



Sat, 07 Aug 2004 01:31:42 GMT  
 Profiler?
 I tried this on Friday and after some futzing around got it to work. The
help is in the VisualStudio.Net combined collection, just look under the
contents tab. If you go to QuickStart and click on the "Profiling an
Application with DevPartner Profiler" link there are specific instructions
for native profiling.
If you still can't get it to work, let me know.

 -Mark


Quote:
>   Thanks, I just downloaded it and I hope it's fantastic!  The reason I
hope
> is I can't exactly get any data out of it.  My code is native and thus
> apparently has some special considerations, but the closest to any help I
> could get was this quote:

> "See Profiling Native Code Applications in the DevPartner Profiler on-line
> help for more information. "

>    I search their site for a good 20 minutes without finding hide nor hair
> of that specific article or the Devpartner Profiler on-line help itself.
> Incase you're curious, I found that above reference at
> http://www.compuware.com/products/devpartner/resources/profiler/ReadM...

> --Jonathan Ross




> > >    One of three possibilities here.  Either the profiler was removed
> from
> > > VC.NET, it's only available in a version higher than professional [
> > > denial ], or it's just been made really hard to find [ latent
denial ].
> > > Which of the previous is true?

> > Hi Jonathan,
> >   The first one is closer to true.  The profiler has been removed from
all
> > versions of Visual Studio.  Instead of providing you with a not-so-good
> > profiler, we teamed up with CompuWare to give you a much better profiler
> > that worked for every language in Visual Studio.  You can go get it for
> free
> > here:
> > <http://www.compuware.com/products/numega/dps/profiler/registration.asp>

> > --
> > Cheerio!
> > Brandon Bray                Program Manager in the Visual C++ Compiler
> Team

> > And now a word from the lawyers: This posting is provided "AS IS" with
no
> > warranties, and confers no rights. You assume all risk for your use. ?
> 2001
> > Microsoft Corporation. All rights reserved.



Sat, 07 Aug 2004 02:08:24 GMT  
 Profiler?
   At last I got it working.  The problem was I kept clicking my work group
and trying to view it's properties, I kept doing this for 55 minutes.
Finally I realized you click on the very top thing preceded by the word
solution.  Oh, if I had known that I'd have had it working almost
immediately.

   After toying with it a bit I got a set of extremely well laid out
information; even the amount of times each line had been accessed.  However,
I noticed that the code took exponentially longer to run with the profiling
tools enables.  Also, I couldn't find reference to how long of a time the
average column refers to, milliseconds, microseconds, nanoseconds.  You'd
think it would be self evident but it's not, I'm fairly certain the slower
code execution is registering or the code it implants into the native code
is destroying the pipelining optimization.

   Anyone know if the profiler is interfering with the results and if so how
to disable to portions which are interfering with my code?  All I really
care about is how long functions run after being fully optimized, I can
figure out which parts of the function need adjustment myself.

    Very cool tool though.  Makes me wonder just how extensively these
plug-ins can get...

C++>Advanced>Compile As
    Default
    Compile as C Code (/TC)
    Compile as Visual C++ Code (/TP)
    Compile as Comeau C++ Code (/TCC)

    Supremely wishful thinking of what would make my life easier if the
profiler is any indication of the fun I'm going to have trying to figure out
how to getting an entirely new language set plug-in to work :)

    Say, any documentation on how to write such a plug-in or is it a
partner/hex dump crawler perk?

--Jonathan Ross
PS: I'm always looking for a new challenge; free Intercal plug-in for those
who love to COME FROM MAKE LIFE HARDER.  Actually, I have a good idea for a
useful plug-in... [ ponders a visual artificial neural network plug-in; Back
Propagation, Koenig<sp?>, etc. ]


Quote:
> I tried this on Friday and after some futzing around got it to work. The
> help is in the VisualStudio.Net combined collection, just look under the
> contents tab. If you go to QuickStart and click on the "Profiling an
> Application with DevPartner Profiler" link there are specific instructions
> for native profiling.
> If you still can't get it to work, let me know.

>  -Mark



Sat, 07 Aug 2004 11:33:14 GMT  
 Profiler?
Jonathan,

Quote:
>     Supremely wishful thinking of what would make my life easier if the
> profiler is any indication of the fun I'm going to have trying to figure
out
> how to getting an entirely new language set plug-in to work :)

>     Say, any documentation on how to write such a plug-in or is it a
> partner/hex dump crawler perk?

That depends as to what kind of plug-in you're talking about. If you are
merely refering to IDE integration, then you might be able to get by with
just an Add-in (developing which is more or less covered in the VS.NET
help), or for more advanced integration you might need to becom an VSIP (VS
Integration Partner), which is more expensive (just how much I don't know).

I have no idea what it would take to integrate with things like the
compiler/linker though... much less if it's even supported by MS, and if so,
how...

--
Tomas Restrepo



Sat, 07 Aug 2004 11:38:27 GMT  
 Profiler?
Hi Jonathan,

If you want to be truly aggressive in supporting an
anti-readability-language, why not go for the big prize:
http://www.muppetlabs.com/~breadbox/bf/ <vbg>

-Ronald-


...

Quote:
> PS: I'm always looking for a new challenge; free Intercal plug-in for
those
> who love to COME FROM MAKE LIFE HARDER.  Actually, I have a good idea for
a
> useful plug-in... [ ponders a visual artificial neural network plug-in;
Back
> Propagation, Koenig<sp?>, etc. ]

...


Sat, 07 Aug 2004 15:00:29 GMT  
 Profiler?
   I was actually going to use that one but decided not to do to the name of
the language and the professional nature of these boards :)  But thanks for
the reference, I had forgotten the two in and out instructions, "." and ","
:)

   For of those real code/star trek freaks out there, try this one;
http://www.geocities.com/connorbd/varaq/  Nothing says glory in battle like
programming in Klingon :)

--Jonathan Ross
Disclaimer: I freely admit I am a "code freak."  Under no circumstances
should you consider my above statements to read that I am a "star trek"
freak, however I do watch it on occasion.  Programming in the above
mentioned language may destroy your ability to comprehend and deal with
social situations.  No Klingons were harmed in the writing of this
information.



Quote:
> Hi Jonathan,

> If you want to be truly aggressive in supporting an
> anti-readability-language, why not go for the big prize:
> http://www.muppetlabs.com/~breadbox/bf/ <vbg>

> -Ronald-



> ...

> > PS: I'm always looking for a new challenge; free Intercal plug-in for
> those
> > who love to COME FROM MAKE LIFE HARDER.  Actually, I have a good idea
for
> a
> > useful plug-in... [ ponders a visual artificial neural network plug-in;
> Back
> > Propagation, Koenig<sp?>, etc. ]
> ...



Sat, 07 Aug 2004 23:39:57 GMT  
 Profiler?
As far as I can tell, the profiler is incompatible with the "Whole Program
Optimization" option; disabling that permits instrumentation to work
properly.

This seems rather unfortunate.

--

Now Playing:  Men at Work - Land Down Under

(1) Horses have an even number of legs.
(2) They have two legs in back and fore legs in front.
(3) This makes a total of six legs, which certainly is an odd number of
    legs for a horse.
(4) But the only number that is both odd and even is infinity.
(5) Therefore, horses must have an infinite number of legs.


Quote:
> I  wouldn't expect *too* much for the time being ;-)
> I downloaded it, and any code I compile with profiling enabled emits
> zillions of messages like this:
> Invalid record, type SSR_UNDEFINED

> and

> Invalid record, type SSR_OOPS

> before I get a popup window explaining that dpcl.exe has attempted to
access
> memory location 0x0000010, which my Win2K system considers to be an Access
> Violation ;^)

> Luc



> >   Thanks, I just downloaded it and I hope it's fantastic!  The reason I
> hope
> > is I can't exactly get any data out of it.  My code is native and thus
> > apparently has some special considerations, but the closest to any help
I
> > could get was this quote:

> > "See Profiling Native Code Applications in the DevPartner Profiler
on-line
> > help for more information. "

> >    I search their site for a good 20 minutes without finding hide nor
hair
> > of that specific article or the Devpartner Profiler on-line help itself.
> > Incase you're curious, I found that above reference at

http://www.compuware.com/products/devpartner/resources/profiler/ReadM...

- Show quoted text -

Quote:

> > --Jonathan Ross




> > > >    One of three possibilities here.  Either the profiler was removed
> > from
> > > > VC.NET, it's only available in a version higher than professional [
> > > > denial ], or it's just been made really hard to find [ latent
> denial ].
> > > > Which of the previous is true?

> > > Hi Jonathan,
> > >   The first one is closer to true.  The profiler has been removed from
> all
> > > versions of Visual Studio.  Instead of providing you with a
not-so-good
> > > profiler, we teamed up with CompuWare to give you a much better
profiler
> > > that worked for every language in Visual Studio.  You can go get it
for
> > free
> > > here:

<http://www.compuware.com/products/numega/dps/profiler/registration.asp>

- Show quoted text -

Quote:

> > > --
> > > Cheerio!
> > > Brandon Bray                Program Manager in the Visual C++ Compiler
> > Team

> > > And now a word from the lawyers: This posting is provided "AS IS" with
> no
> > > warranties, and confers no rights. You assume all risk for your use. ?
> > 2001
> > > Microsoft Corporation. All rights reserved.



Mon, 16 Aug 2004 00:03:02 GMT  
 Profiler?
Thannks, I'll give it a try...

Luc


Quote:
> As far as I can tell, the profiler is incompatible with the "Whole Program
> Optimization" option; disabling that permits instrumentation to work
> properly.

> This seems rather unfortunate.

> --

> Now Playing:  Men at Work - Land Down Under

> (1) Horses have an even number of legs.
> (2) They have two legs in back and fore legs in front.
> (3) This makes a total of six legs, which certainly is an odd number of
>     legs for a horse.
> (4) But the only number that is both odd and even is infinity.
> (5) Therefore, horses must have an infinite number of legs.



> > I  wouldn't expect *too* much for the time being ;-)
> > I downloaded it, and any code I compile with profiling enabled emits
> > zillions of messages like this:
> > Invalid record, type SSR_UNDEFINED

> > and

> > Invalid record, type SSR_OOPS

> > before I get a popup window explaining that dpcl.exe has attempted to
> access
> > memory location 0x0000010, which my Win2K system considers to be an
Access
> > Violation ;^)

> > Luc



> > >   Thanks, I just downloaded it and I hope it's fantastic!  The reason
I
> > hope
> > > is I can't exactly get any data out of it.  My code is native and thus
> > > apparently has some special considerations, but the closest to any
help
> I
> > > could get was this quote:

> > > "See Profiling Native Code Applications in the DevPartner Profiler
> on-line
> > > help for more information. "

> > >    I search their site for a good 20 minutes without finding hide nor
> hair
> > > of that specific article or the Devpartner Profiler on-line help
itself.
> > > Incase you're curious, I found that above reference at

> http://www.compuware.com/products/devpartner/resources/profiler/ReadM...

> > > --Jonathan Ross




> > > > >    One of three possibilities here.  Either the profiler was
removed
> > > from
> > > > > VC.NET, it's only available in a version higher than professional
[
> > > > > denial ], or it's just been made really hard to find [ latent
> > denial ].
> > > > > Which of the previous is true?

> > > > Hi Jonathan,
> > > >   The first one is closer to true.  The profiler has been removed
from
> > all
> > > > versions of Visual Studio.  Instead of providing you with a
> not-so-good
> > > > profiler, we teamed up with CompuWare to give you a much better
> profiler
> > > > that worked for every language in Visual Studio.  You can go get it
> for
> > > free
> > > > here:

> <http://www.compuware.com/products/numega/dps/profiler/registration.asp>

> > > > --
> > > > Cheerio!
> > > > Brandon Bray                Program Manager in the Visual C++
Compiler
> > > Team

> > > > And now a word from the lawyers: This posting is provided "AS IS"
with
> > no
> > > > warranties, and confers no rights. You assume all risk for your use.
?
> > > 2001
> > > > Microsoft Corporation. All rights reserved.



Mon, 16 Aug 2004 00:56:51 GMT  
 
 [ 14 post ] 

 Relevant Pages 

1. Profiler & Leak detector

2. Profiler

3. Profiler

4. Where's my profiler??

5. Compuware Profiler

6. Is there a profiler comes with VC7??

7. q: profiler for webform app ?

8. VS.NET Profiler

9. C profiler at micrsosecond level timing

10. C source analyser/profiler

11. Binary Profiler

12. Student(Beginner) - How do I use Borlands Profiler?

 

 
Powered by phpBB® Forum Software