Click here to Skip to main content
15,901,283 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Intervals of three Pin
Iain Clarke, Warrior Programmer19-Jun-07 6:09
Iain Clarke, Warrior Programmer19-Jun-07 6:09 
QuestionRe: Intervals of three Pin
David Crow19-Jun-07 6:12
David Crow19-Jun-07 6:12 
AnswerRe: Intervals of three Pin
Iain Clarke, Warrior Programmer19-Jun-07 10:58
Iain Clarke, Warrior Programmer19-Jun-07 10:58 
GeneralRe: Intervals of three Pin
Programm3r19-Jun-07 6:13
Programm3r19-Jun-07 6:13 
QuestionMemo datatype gives error in Recordset Pin
shivditya19-Jun-07 5:48
shivditya19-Jun-07 5:48 
AnswerRe: Memo datatype gives error in Recordset Pin
ahmad_ali20-Jun-07 4:35
ahmad_ali20-Jun-07 4:35 
AnswerRe: Memo datatype gives error in Recordset Pin
shivditya20-Jun-07 4:51
shivditya20-Jun-07 4:51 
QuestionC++ Timing, Profiler and timers Pin
wings219-Jun-07 5:45
wings219-Jun-07 5:45 
I am using Microsoft Visual C++ 6.0 Professional to develop a program that will output data to avionics equipment.

My question is how to run the profiler to do timing analysis on my program.
Here are some details on what I'm trying to do:

The program is dialog based. The dialogs are used to capture user input values for the data to be output.

I created a timer that looks like:
m_UpdateTimer = SetTimer (1, 1, NULL);

From what I understand, this timer should trigger every 1 ms.

I created a message map to trigger when the timer ticks:

BEGIN_MESSAGE_MAP(CbrsttDlg, CDialog)
    ON_WM_TIMER()
...
END_MESSAGE_MAP()


I have a procedure which is called every time the timer triggers:
MyProg::OnTimer() { ... code .. }


My procedure does get called regularly. However I don't think it's being called every 1 ms. I want to find out how often this procedure is being called .

I know that there is a profiler that does timing analysis that comes with the Microsoft Visual Studio. I believe I have it installed.
I have set the "Enable Profiling" option on the Link tab in the Project settings.

Under the Build menu there is a Profile... option. I clicked that and chose "Function Timing". According to the MSDN library, if I want to do timing on a single procedure I need to put this in the advanced Settings: box.

MSDN says:
"Or, if you are in the development environment, you might type the following in the Advanced settings text box of the Profile dialog box,

SF ?MyFunc@@YAXPAH@@"

I looked up my function in the map file. The line in the map file says:

0001:00007980 ?OnTimer@CbrsttDlg@@IAEXI@Z 00408980 f brsttDlg.obj

So I put :
SF ?OnTimer@CbrsttDlg@@IAEXI@Z

into the Advanced settings: box.

When I click OK on the Profile box it says in the profile tab:
PREP : fatal error PRF1011: cannot open file p:\brs_taws_sw\tools\brstaw_test_tool\brstt\debug\sf.exe

Now, I'm completely lost. Why is it looking for sf.exe? Frown | :(
Supposedly (according to MSDN lib), the SF is an option to the PREP tool.

I have googled looking for information on how to use the profiler but haven't come up with anything useful. Some of the info I found says to use some .ini files for PREP and a couple other things. But I don't know where these files are, how they get created, or what to put in them.

If someone can point me to a site with some useful information for a newb, it would be greatly appreciated.

Thanks in advance.
AnswerRe: C++ Timing, Profiler and timers Pin
softwaremonkey19-Jun-07 6:09
softwaremonkey19-Jun-07 6:09 
QuestionRe: C++ Timing, Profiler and timers Pin
wings220-Jun-07 6:30
wings220-Jun-07 6:30 
AnswerRe: C++ Timing, Profiler and timers Pin
Nemanja Trifunovic19-Jun-07 6:11
Nemanja Trifunovic19-Jun-07 6:11 
AnswerRe: C++ Timing, Profiler and timers Pin
David Crow19-Jun-07 6:11
David Crow19-Jun-07 6:11 
AnswerRe: C++ Timing, Profiler and timers Pin
Iain Clarke, Warrior Programmer19-Jun-07 6:21
Iain Clarke, Warrior Programmer19-Jun-07 6:21 
AnswerRe: C++ Timing, Profiler and timers Pin
Force Code19-Jun-07 9:45
Force Code19-Jun-07 9:45 
GeneralRe: C++ Timing, Profiler and timers Pin
Force Code19-Jun-07 9:53
Force Code19-Jun-07 9:53 
GeneralRe: C++ Timing, Profiler and timers Pin
Mark Salsbery19-Jun-07 10:03
Mark Salsbery19-Jun-07 10:03 
GeneralRe: C++ Timing, Profiler and timers [modified] Pin
Force Code19-Jun-07 10:45
Force Code19-Jun-07 10:45 
GeneralRe: C++ Timing, Profiler and timers Pin
Mark Salsbery19-Jun-07 10:57
Mark Salsbery19-Jun-07 10:57 
GeneralRe: C++ Timing, Profiler and timers Pin
Force Code19-Jun-07 11:06
Force Code19-Jun-07 11:06 
GeneralRe: C++ Timing, Profiler and timers Pin
Mark Salsbery19-Jun-07 11:17
Mark Salsbery19-Jun-07 11:17 
GeneralRe: C++ Timing, Profiler and timers Pin
Force Code19-Jun-07 11:30
Force Code19-Jun-07 11:30 
QuestionSwitching to administrator programmatically Pin
softwaremonkey19-Jun-07 5:39
softwaremonkey19-Jun-07 5:39 
JokeRe: Switching to administrator programmatically Pin
shivditya19-Jun-07 5:50
shivditya19-Jun-07 5:50 
AnswerRe: Switching to administrator programmatically Pin
David Crow19-Jun-07 6:16
David Crow19-Jun-07 6:16 
QuestionGetting version information into a DLL using manually created .rc file Pin
Barry True19-Jun-07 5:20
Barry True19-Jun-07 5:20 

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.