Locked VS2008: PRF0025 with MFC application

  • Thursday, August 19, 2010 8:42 AM
     
     

    Hi,

    I can't get the profiler to work (from the Visual Studio IDE).

    My Configuration: Windows Vista x64 SP 2, Visual Studio 2008 SP 1 Development Edition, Intel Core i7-950 (Patch KB958842 installed because of BSOD)

    If I try to profile our application (MFC, 32 Bit), it crashes immediately.

    If I try to profile a simple dialog based MFC-application, the profiler runs through, but produces either no VSP-file at all or one of size 0 bytes.

    This happens both with sampling and instrumentation mode.

All Replies

  • Friday, August 20, 2010 6:49 AM
    Moderator
     
     

    Hello,

    Thanks for your post!

    Visual Studio 2008 Development edition profiling tools should work in a 64-bit environment.
    http://msdn.microsoft.com/en-us/library/dd164415(VS.90).aspx

    This issue is caused by the OS redirector and Registry redirector in a 64-bit box. Those redirectors make things different with Visual Studio profiler (see here for more information). Since you compile your MFC application as a 32bit machine, you need to execute 32-bit regsvr32.exe against your 32-bit Profiler DLL.

    Best regards


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    If you have any feedback, please tell us.
    Welcome to the All-In-One Code Framework!
  • Saturday, August 21, 2010 2:04 PM
     
     

    Hello,

     

    sorry, but I don't understand how the second article you mention does apply to my problem, because it's about "CLRs profiling API".

    Neither do I use CLR nor write my own profiling DLL.

    I just wanted to try to profile a simple native MFC 32 dialog based exe (for the beginning).

    When I come back to work on Monday I will try if at least a simple Win 32 "Hello World" works.

     

     

  • Tuesday, August 24, 2010 8:22 AM
     
     
    The simple Win 32 programm didn't work either.
  • Thursday, August 26, 2010 6:57 AM
     
     

    Does nobody know a solution?

    Our company has bought 7 licences of the expensive VS 2008 development editions instead of the cheaper professional editions ONLY because of the profiling tools, and now they don't work!

     

  • Thursday, August 26, 2010 12:34 PM
     
     

    Using "Process Monitor" I have found out that the VSP file is created and filled:

     

    14:30:55,0153084 devenv.exe 2380 696 QueryOpen D:\Prog\test\profile2\profile2100826.vsp NAME NOT FOUND 
    14:30:55,2279212 VSPerfMon.exe 4432 5484 QueryOpen D:\Prog\test\profile2\profile2100826.vsp NAME NOT FOUND 
    14:30:55,2280022 VSPerfMon.exe 4432 5484 CreateFile D:\Prog\test\profile2\profile2100826.vsp SUCCESS Desired Access: Generic Read/Write, Disposition: OverwriteIf, Options: Write Through, Sequential Access, No Buffering, Non-Directory File, Attributes: n/a, ShareMode: None, AllocationSize: 0, OpenResult: Created
    14:30:55,2292851 VSPerfMon.exe 4432 5484 QueryStandardInformationFile D:\Prog\test\profile2\profile2100826.vsp SUCCESS AllocationSize: 0, EndOfFile: 0, NumberOfLinks: 1, DeletePending: False, Directory: False
    14:30:55,2293051 VSPerfMon.exe 4432 5484 CloseFile D:\Prog\test\profile2\profile2100826.vsp SUCCESS 
    14:30:55,2504005 VSPerfMon.exe 4432 4176 CreateFile D:\Prog\test\profile2\profile2100826.vsp SUCCESS Desired Access: Generic Read/Write, Disposition: OverwriteIf, Options: Write Through, Sequential Access, No Buffering, Non-Directory File, Attributes: n/a, ShareMode: None, AllocationSize: 0, OpenResult: Overwritten
    14:30:55,2528887 VSPerfMon.exe 4432 4176 WriteFile D:\Prog\test\profile2\profile2100826.vsp SUCCESS Offset: 0, Length: 20.480, I/O Flags: Non-cached, Priority: Normal
    14:30:56,2238560 VSPerfMon.exe 4432 4176 WriteFile D:\Prog\test\profile2\profile2100826.vsp SUCCESS Offset: 0, Length: 20.480, I/O Flags: Non-cached, Priority: Normal
    14:30:56,4053234 SearchProtocolHost.exe 5832 4316 CreateFile D:\Prog\test\profile2\profile2100826.vsp SHARING VIOLATION Desired Access: Generic Read, Disposition: Open, Options: Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a
    14:30:57,3005184 VSPerfMon.exe 4432 4176 WriteFile D:\Prog\test\profile2\profile2100826.vsp SUCCESS Offset: 20.480, Length: 131.072, I/O Flags: Non-cached, Priority: Normal
    14:30:57,3039994 VSPerfMon.exe 4432 4176 WriteFile D:\Prog\test\profile2\profile2100826.vsp SUCCESS Offset: 0, Length: 20.480, I/O Flags: Non-cached, Priority: Normal
    14:30:57,3048793 VSPerfMon.exe 4432 4176 CloseFile D:\Prog\test\profile2\profile2100826.vsp SUCCESS 

     

    But when the profiling ends, it's deleted immediately by devenv.exe:


    14:30:57,3124551 devenv.exe 2380 3868 QueryOpen D:\Prog\test\profile2\profile2100826.vsp SUCCESS CreationTime: 26.08.2010 14:30:55, LastAccessTime: 26.08.2010 14:30:55, LastWriteTime: 26.08.2010 14:30:57, ChangeTime: 26.08.2010 14:30:57, AllocationSize: 151.552, EndOfFile: 151.552, FileAttributes: A
    14:30:57,3572464 devenv.exe 2380 3868 QueryOpen D:\Prog\test\profile2\profile2100826.vsp SUCCESS CreationTime: 26.08.2010 14:30:55, LastAccessTime: 26.08.2010 14:30:55, LastWriteTime: 26.08.2010 14:30:57, ChangeTime: 26.08.2010 14:30:57, AllocationSize: 151.552, EndOfFile: 151.552, FileAttributes: A
    14:30:57,3573937 devenv.exe 2380 3868 CreateFile D:\Prog\test\profile2\profile2100826.vsp SUCCESS Desired Access: Read Attributes, Delete, Disposition: Open, Options: Non-Directory File, Open Reparse Point, Attributes: n/a, ShareMode: Read, Write, Delete, AllocationSize: n/a, OpenResult: Opened
    14:30:57,3576366 devenv.exe 2380 3868 QueryAttributeTagFile D:\Prog\test\profile2\profile2100826.vsp SUCCESS Attributes: A, ReparseTag: 0x0
    14:30:57,3576637 devenv.exe 2380 3868 SetDispositionInformationFile D:\Prog\test\profile2\profile2100826.vsp SUCCESS Delete: True
    14:30:57,3577015 devenv.exe 2380 3868 CloseFile D:\Prog\test\profile2\profile2100826.vsp SUCCESS