Click here to Skip to main content
15,921,837 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: menu Pin
David Crow23-Sep-03 7:03
David Crow23-Sep-03 7:03 
Generalhelp on drawing application in VC++ Pin
swerajan23-Sep-03 4:31
swerajan23-Sep-03 4:31 
QuestionWhat Profiler message means ? Pin
vgrigor23-Sep-03 4:30
vgrigor23-Sep-03 4:30 
Generalmenu Pin
sardinka23-Sep-03 4:23
sardinka23-Sep-03 4:23 
GeneralRe: menu Pin
RobJones23-Sep-03 4:30
RobJones23-Sep-03 4:30 
GeneralRe: menu Pin
Chris Richardson23-Sep-03 11:04
Chris Richardson23-Sep-03 11:04 
QuestionWhat means such Profiler output ? Pin
vgrigor23-Sep-03 4:04
vgrigor23-Sep-03 4:04 
AnswerRe: What means such Profiler output ? Pin
Mike Dimmick23-Sep-03 5:53
Mike Dimmick23-Sep-03 5:53 
First: despite the names, <pre> produces better-formatted code than <code>.

If your control is implemented as a DLL, it will be loaded into the container's process. I'm not sure that OLE Controls/ActiveX Controls work out-of-process, in any case.

COM may introduce a proxy if the thread creating the control is not in a single-threaded apartment at the time the control is created.

Your profiler output lists, in order of time spent in the function and the functions it called (children above), the functions that were called in the profiler run. The top function called (i.e., the one in which most time was spent) was WaitForSingleObject.

WaitForSingleObject, of course, is a system function. There's not a lot you can do to that, apart from ensuring that you're only holding synchronisation objects as long as you need them, and no longer.

Function names beginning with '#' are functions where the DLL exports the function by ordinal, not by name. The MFC DLLs do this to save about 1MB of space for the name table, and to improve loading speed. To find the function, ensure that you have the MFC source code installed, then look for the file mfc71d.def - typically in C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\atlmfc\src\Intel (IIRC). This file lists the decorated name of the function (on the left) and its ordinal (on the right, after the '@' symbol). Use the SDK tool undname to undecorate the name. If there are multiple overloads of the function, use the -f switch to find out which one.

For example, MFC 6 has the following for ordinal #1718:
?CreatePointFontIndirect@CFont@@QAEHPBUtagLOGFONTA@@PAVCDC@@@Z @ 1718 NONAME
undname -f gives
C:\>undname -f ?CreatePointFontIndirect@CFont@@QAEHPBUtagLOGFONTA@@PAVCDC@@@Z
Microsoft(R) Windows NT(R) Operating System
UNDNAME Version 5.00.1768.1Copyright (C) Microsoft Corp. 1981-1998
 
>> ?CreatePointFontIndirect@CFont@@QAEHPBUtagLOGFONTA@@PAVCDC@@@Z == public: int
 __thiscall CFont::CreatePointFontIndirect(struct tagLOGFONTA const *,class CDC
*)
Working across the profiler's output, you have: the name of the function, the percentage of time spent in this function's code (not including functions it called), the percentage of time spent in this function and the functions it called, the number of times this function was called, and the average time to execute each call.

The function that spent the most time, that you wrote, is PtAllSet::baseGet. You should probably look to see whether the algorithm this function uses can be improved.
GeneralRe: What means such Profiler output ? Pin
vgrigor23-Sep-03 6:02
vgrigor23-Sep-03 6:02 
Generaldll shared data Pin
umarcool23-Sep-03 3:47
umarcool23-Sep-03 3:47 
GeneralRe: dll shared data Pin
Mike Dimmick23-Sep-03 4:14
Mike Dimmick23-Sep-03 4:14 
GeneralRe: dll shared data Pin
umarcool23-Sep-03 5:35
umarcool23-Sep-03 5:35 
GeneralRe: dll shared data Pin
Alexander M.,27-Sep-03 7:29
Alexander M.,27-Sep-03 7:29 
Generalwriting general plugins fro winamp in VC++. Pin
karteek23-Sep-03 3:40
karteek23-Sep-03 3:40 
Generaldatabase delete help! Pin
coda_x23-Sep-03 2:52
coda_x23-Sep-03 2:52 
GeneralRe: database delete help! Pin
David Crow23-Sep-03 3:01
David Crow23-Sep-03 3:01 
QuestionHow to invoke a function at a regular interval? Pin
George223-Sep-03 1:54
George223-Sep-03 1:54 
AnswerRe: How to invoke a function at a regular interval? Pin
sashaf23-Sep-03 2:40
sashaf23-Sep-03 2:40 
GeneralRe: How to invoke a function at a regular interval? Pin
Mike Dimmick23-Sep-03 2:50
Mike Dimmick23-Sep-03 2:50 
GeneralRe: How to invoke a function at a regular interval? Pin
George223-Sep-03 16:44
George223-Sep-03 16:44 
GeneralRe: How to invoke a function at a regular interval? Pin
George223-Sep-03 16:45
George223-Sep-03 16:45 
GeneralQuestion about enum in C/C++ Pin
George223-Sep-03 1:48
George223-Sep-03 1:48 
GeneralRe: Question about enum in C/C++ Pin
567890123423-Sep-03 3:22
567890123423-Sep-03 3:22 
GeneralRe: Question about enum in C/C++ Pin
George223-Sep-03 16:51
George223-Sep-03 16:51 
GeneralRe: Question about enum in C/C++ Pin
Mike Dimmick23-Sep-03 4:03
Mike Dimmick23-Sep-03 4:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.