|
Thanks for all the fish wrote: Would it be possible to have an html link somewhere in the middle of the edit box?
Yes, if it was a rich edit control.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi,
I was wondering if it was possible to step into operator+ and operator+= for ints and everything else other than strings?
Can't find out how or even if it's possible so was wondering if anyone knew?
cheers
|
|
|
|
|
As those are basic/atomic types, I do not think so, at least not without dropping down to assembly code.
Peace!
-=- James Please rate this message - let me know if I helped or not!<hr></hr> If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! See DeleteFXPFiles
|
|
|
|
|
Why would you ever need such a thing ?
What problem do you encounter ?
|
|
|
|
|
For integers you cannot: they are built in types (not objects) and their instances are simply added without any function call, as you can easily see on the disassembly, for instance
int i,j;
j=5;
0041143E mov dword ptr [j],5
i=j+10;
00411445 mov eax,dword ptr [j]
00411448 add eax,0Ah
0041144B mov dword ptr [i],eax
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
[my articles]
|
|
|
|
|
thankyou pallini, that basically solves it.
im just trying to compare:
int = int + int
int += int
vs
string = string + string
string += string
and using disassembly nicely backs up what i thought that the compiler optmizes ints to do exactly the same compared to strings.
thanks again
|
|
|
|
|
admgamer wrote: I was wondering if it was possible to step into operator+ and operator+= for ints...
Not for integral types.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hello everyone,
I am new to page fault monitor tool (pfmon.exe). Well, there is not too much help information about the parameters. I am wondering what are your preferred parameter if you want to monitor both soft and hard page fault of a process?
Just want to learn from you experienced guys since I can not find any documents with samples. Reading information from /? is sometimes boring.
If there are any links of documents with samples about this tool, it is also appreciated.
thanks in advance,
George
|
|
|
|
|
It's normal mode shows both hard and soft faults. Just pass the name of the app you want to monitor as the first argument i.e. pfmon notepad. You did do pfmon /? at the command line, didn't you? The options look pretty straight-forward to me.
Judy
|
|
|
|
|
Thanks Judy,
I have typed pfmon notepad, no error messages and no notepad application is invoked to display. Shall I start notepad at first, then type pfmon notepad? Which is the correct way?
regards,
George
|
|
|
|
|
It works for me. I opened the command prompt, changed to the directory where pfmon.exe lives, typed pfmon notepad , and .... notepad launched and pfmon dumped lots of info to the command window. When I closed notepad, a summary appeared and pfmon terminated.
XP SP2
Judy
|
|
|
|
|
Thanks, Judy!
It works for my now! I previously used the wrong version pfmon.exe for x86 platform on my x64 desktop. There are a lot of information dumped to console, do you know how to dump result into file? I only interested in the number of soft and hard page faults after a long run of my application.
regards,
George
|
|
|
|
|
The same way you redirect console output from any command-line program:
foo.exe > outputfile.txt
|
|
|
|
|
Thanks Judy,
I have met with two further issues.
1.
There is something like,
Warning: Page fault buffer has overflowed
Warning: Page fault buffer has overflowed
Warning: Page fault buffer has overflowed
Warning: Page fault buffer has overflowed
Warning: Page fault buffer has overflowed
Warning: Page fault buffer has overflowed
Warning: Page fault buffer has overflowed
Warning: Page fault buffer has overflowed
Warning: Page fault buffer has overflowed
when I use -h -n to start my application using pfmon.exe, what is the issue? How to solve it?
2.
Here is a section of pfmon.log, I think it means there is a page fault in function RtlCreateTagHeap, right? What is the pow, +0x274, and +0x0000000000001C54 mean?
HARD: RtlCreateTagHeap+0x274 : pow+0x0000000000001C54
regards,
George
|
|
|
|
|
I don't know for sure but I'll take a guess or two
George_George wrote: 1.
There is something like,
Warning: Page fault buffer has overflowed
Warning: Page fault buffer has overflowed
I'd wager the program maintains an internal buffer that logs the faults and a seperate thread that outputs the buffer to the log file. This appears when faults are coming in faster than the output thread can empty the buffer.
George_George wrote: 2.
Here is a section of pfmon.log, I think it means there is a page fault in function RtlCreateTagHeap, right? What is the pow, +0x274, and +0x0000000000001C54 mean?
HARD: RtlCreateTagHeap+0x274 : pow+0x0000000000001C54
HARD: kind of fault
RtlCreateTagHeap+0x274: where fault occured - i.e. code address that caused the fault
pow+0x0000000000001C54: address of memory that was trying to be accessed
It shows as some_name+xxxx whenever that 3rd address is close enough or in the same segment as a function. Instead of just a raw address, you're getting the address relative to the start of a function.
Judy
|
|
|
|
|
Thanks Judy,
Great!
1.
JudyL_FL wrote: I'd wager the program maintains an internal buffer that logs the faults and a seperate thread that outputs the buffer to the log file. This appears when faults are coming in faster than the output thread can empty the buffer.
Any ways or parameter to increase the internal buffer? Do you experienced the same issue?
2.
JudyL_FL wrote: RtlCreateTagHeap+0x274: where fault occured - i.e. code address that caused the fault
pow+0x0000000000001C54: address of memory that was trying to be accessed
It shows as some_name+xxxx whenever that 3rd address is close enough or in the same segment as a function. Instead of just a raw address, you're getting the address relative to the start of a function.
So, RtlCreateTagHeap is the function name, and 0x274 is the offset from the RtlCreateTagHeap where the code in function RtlCreateTagHeap causes hard page fault?
But what is pow?
regards,
George
|
|
|
|
|
George_George wrote: Any ways or parameter to increase the internal buffer? Do you experienced the same issue?
I doubt it - if it was a parameter, I think it would be listed in the /? screen. I don't particularly use the tool so I have very little experience with it.
George_George wrote: So, RtlCreateTagHeap is the function name, and 0x274 is the offset from the RtlCreateTagHeap where the code in function RtlCreateTagHeap causes hard page fault?
Probably. Note that the address is relative to the closest "named" function. If it's inside a function without a name (as in a non-exported function in a DLL compiled in full-up release mode), it may be a raw address or an offset from the previous function.
George_George wrote: But what is pow?
pow is a math function prototyped in <complex.h>. Again, this is a relative address. Pfmon is taking a stab at making the raw address more meaningful by listing it as an offset from the closest thing that has a name.
All these relative addresses become much more useless (yes, useless is not a typo) when you are dealing with optimized / release mode code since function names can be stripped out of the executable and code rearranged. If you're not careful, you can start digging through the wrong code. You really need to have a .MAP file when trying to correlate a relative address into your release-mode code.
Judy
|
|
|
|
|
Thanks Judy,
Do you think messages like this,
Warning: Page fault buffer has overflowed
Warning: Page fault buffer has overflowed
indicats a bug of my application or a bug/limit of pfmon.exe itself?
regards,
George
|
|
|
|
|
|
Thanks Judy!
It is surprised to see we find a bug of pfmon.exe. Do you know any other tool to monitor soft and hard page fault separately?
regards,
George
|
|
|
|
|
George_George wrote: bug of pfmon.exe
I wouldn't classify it as a bug. There is a limit to the size of their buffer and the target program is filling it faster than it can be emptied. The developers have made a choice regarding how much backlog to keep and how to handle the case when the backlog exceeds the buffer size. There's got to be a limit somewhere or else the program will eat all the memory if the input data rate is greater than output data rate. Do you get the same thing if you don't send the output to the log file? Disks are very slow, relatively speaking. It's a performance limitation, not a bug.
George_George wrote: Do you know any other tool to monitor soft and hard page fault separately?
off the top of my head, no
Judy
|
|
|
|
|
Thanks for your patience and help on this thread, Judy!
My question is answered.
have a good day,
George
|
|
|
|
|
I didnt see this[^] link,but its about page fault.
|
|
|
|
|
Thanks Hamid,
But I do not think it relates to my question.
regards,
George
|
|
|
|
|
No again it wast about page fault,I guess maybe you want to read more info,ok!
|
|
|
|