Author |
Topic: PROFILER UTILITY (Read 5812 times) |
|
Michael Hutton
Developer
member is offline


Gender: 
Posts: 248
|
 |
Re: PROFILER UTILITY
« Reply #25 on: May 6th, 2013, 08:19am » |
|
Quote: Is that how the profiler utility currently works? |
|
No, as you say it is non-trivial. In fact, one of the most non-trivial aspects of getting the utility to work is making sure that the @dir$ is correct for the program you are profiling as any resources that the program requires are in that directory rather than the profiler's directory, but that is a side issue.
It is compiled with a fairly recent BB4W run time engine. Although a theoretical problem, I am not sure in reality it is really a problem. As you say there is no active BB4W development but only bug fixes if there is really a need to recompile and ask people to update that really shouldn't be a problem. If that really is an issue (I don't believe so at the moment) then it could easily be recompiled.
Quote:On 64-bits Windows 8, ......EXAMPLES\GRAPHICS\CHAIN.BBC. |
|
Bizarre. I am using windows 7 64 bit and I can profile Chain. with out any problems. I am sure it is nothing to do with the 64-bit whatsoever I use 64-bit on every computer I have and have never had a problem.
Code:
Profiler report file - Mon.06 May 2013,09:17:40
File - C:\Program Files (x86)\BBC BASIC for Windows\EXAMPLES\GRAPHICS\CHAIN.BBC
Figures in the first column indicate approximate
time in milliseconds spent in each program line.
Figures in the second column indicate approximate
percentage of the total time spent in each program line.
Time spent Profiling : 12546 milliseconds.
1: 0.01 REM Chain
0: REM by David A. Williams with modifications by Richard T. Russell
0:
0: balls% = 100
0:
0: SYS "LoadImage", 0, @dir$+"BALL.ICO", 1, 32, 32, 16 TO H%
0: IF H%=0 ERROR 100, "Could not load file BALL.ICO"
0:
0: MODE 8
0: VDU 28,13,28,66,3
0: *ESC OFF
0: *FLOAT64
0: *REFRESH OFF
0:
0: ON ERROR OSCLI "REFRESH ON":PRINT 'REPORT$:END
0:
0: t=0
0: OFF
0: REPEAT
466: 3.71 CLS
0: FOR I%=1 TO balls%
68: 0.54 C%=320+180*SINRAD(t/3+I%)*COSRAD(t+8*I%)
56: 0.45 D%=256+180*COSRAD(t/4+2*I%)*SINRAD(t+10*I%)
7: 0.06 t+=0.03
1398: 11.14 SYS "DrawIcon", @memhdc%, C%, D%, H%
12: 0.10 NEXT I%
126: 1.00 *REFRESH
10412: 82.99 UNTIL INKEY(2)=32
0: *REFRESH ON
0: QUIT
0: Libraries and immediate mode
|
|
Logged
|
|
|
|
admin
Administrator
member is offline


Posts: 1145
|
 |
Re: PROFILER UTILITY
« Reply #26 on: May 6th, 2013, 09:13am » |
|
on May 6th, 2013, 08:19am, Michael Hutton wrote:| If that really is an issue (I don't believe so at the moment) |
|
I'm afraid I definitely consider it to be an "issue". Specifically, any program which contains a *TIMER command (added in v5.94a) cannot be profiled, since it will generate a 'Bad command' error. More generally, every new version of BB4W contains bug fixes - that's the primary reason for the annual (or so) releases - so it's not really acceptable for the bugs to 'return' when profiling a program!
Quote:| then it could easily be recompiled. |
|
Not by me! That is the crucial thing - I have no way of updating the profiler utility because I don't have the source. If you decide to release the source then I could recompile it - if I remember - but I'd still prefer it not to be necessary.
Quote:| I am using windows 7 64 bit and I can profile Chain. with out any problems. |
|
I have no access to a 64-bit Windows 7 machine so I can't check that. Are there any specific tests you would like me to perform on the Windows 8 machine to trace the problem?
Quote:| I am sure it is nothing to do with the 64-bit whatsoever I use 64-bit on every computer I have and have never had a problem. |
|
In my experience, compatibility issues are much more likely to be due to the 64-bits than to the version of Windows. For example, as you may know, *RUN doesn't work properly in Win64 (that's something I need to address in the next release of BB4W). And the Unicode string alignment issue, recently discussed on the Yahoo! group, is specific to Win64 too.
I would not anticipate the next version of BB4W being released until the September time-frame, so you have some time to find and fix the fault. But I wouldn't be able to distribute the profiler utility as it stands.
Richard.
|
|
Logged
|
|
|
|
Michael Hutton
Developer
member is offline


Gender: 
Posts: 248
|
 |
Re: PROFILER UTILITY
« Reply #27 on: May 8th, 2013, 3:26pm » |
|
I will email you the code. Unfortunately, I do not have the time to keep the utility up to date and I am not sure I have the skills to do so anyhow. If new 64-bit issues are a problem then you would be the best to address them. Also, the utitlity might of had it's day if there are problems with *TIMER etc, and the need to recompile all the time would make it difficult for me to keep track of the different issues which could arise.
Shame, I enjoyed making it (even if most of it is your code).
Michael
|
|
Logged
|
|
|
|
admin
Administrator
member is offline


Posts: 1145
|
 |
Re: PROFILER UTILITY
« Reply #28 on: May 8th, 2013, 4:18pm » |
|
on May 8th, 2013, 3:26pm, Michael Hutton wrote:| I do not have the time to keep the utility up to date and I am not sure I have the skills to do so anyhow |
|
You and me both! My coding abilities are a mere shadow of what they once were, and I find that I make silly mistakes in even the simplest of programs. I am in little doubt that I am suffering from the early stages of dementia.
Quote:| If new 64-bit issues are a problem then you would be the best to address them. |
|
I have only limited access to any 64-bit machines. All the main PCs which I use for testing BB4W (Windows 95, Me, 2000, XP, Windows 7 Home and Windows 7 Pro) are 32-bits. So in that sense I'm not well placed to debug 64-bit issues, but if you haven't the time I'll do what I can. Discontinuing BB4W altogether must be an option, unfortunately.
Richard.
|
|
Logged
|
|
|
|
DDRM
Administrator
member is offline


Gender: 
Posts: 321
|
 |
Re: PROFILER UTILITY
« Reply #29 on: May 10th, 2013, 10:47am » |
|
on May 8th, 2013, 4:18pm, Richard Russell wrote:...Discontinuing BB4W altogether must be an option, unfortunately. |
|
I certainly hope not, Richard! I use BB4W on 64 bit Vista on my home desktop and 64 bit Windows 7 on my laptop with no detectable problems. I know I don't stretch it much, but I'd be very sorry to lose it (and your outstanding support) for the sake of a few minor issues "at the periphery".
Best wishes,
David
|
|
Logged
|
|
|
|
admin
Administrator
member is offline


Posts: 1145
|
 |
Re: PROFILER UTILITY
« Reply #30 on: May 10th, 2013, 5:04pm » |
|
on May 10th, 2013, 10:47am, DDRM wrote:| I'd be very sorry to lose it (and your outstanding support) for the sake of a few minor issues "at the periphery". |
|
One man's "minor issue" is another's "fatal flaw"! Somebody relying on *RUN in their program would no doubt consider the fact that it doesn't work in Win64 to be pretty serious.
Richard.
|
|
Logged
|
|
|
|
Michael Hutton
Developer
member is offline


Gender: 
Posts: 248
|
 |
Re: PROFILER UTILITY
« Reply #31 on: May 14th, 2013, 1:45pm » |
|
I've just sent the file to you Richard.
|
|
Logged
|
|
|
|
admin
Administrator
member is offline


Posts: 1145
|
 |
Re: PROFILER UTILITY
« Reply #32 on: May 14th, 2013, 4:09pm » |
|
on May 14th, 2013, 1:45pm, Michael Hutton wrote:| I've just sent the file to you Richard. |
|
Thanks.
Out of interest, what happened to the v4.0b (beta) referred to earlier in the thread, and what were its advantages supposed to be?
Richard.
|
|
Logged
|
|
|
|
Michael Hutton
Developer
member is offline


Gender: 
Posts: 248
|
 |
Re: PROFILER UTILITY
« Reply #33 on: May 15th, 2013, 7:08pm » |
|
I've got that and can send it to you. Basically the timing was done in a seperate thread which I thought might be better. For what reason I cannot remember now. I've used it quite a lot and it doesn't seem to have any other problems which the 3.0d vesion doesn't.
Michael
|
|
Logged
|
|
|
|
|