Author |
Topic: PROFILER UTILITY (Read 5817 times) |
|
admin
Administrator
member is offline


Posts: 1145
|
 |
Re: PROFILER UTILITY
« Reply #9 on: May 7th, 2009, 2:37pm » |
|
Quote:| perhaps Richard's tokenized .BBC file to HTML file converter could be implemented as an IDE utility? |
|
I don't want to be a wet blanket here, but I feel I should point out that adapting BBC2HTML.BBC, not being one of the supplied example programs, would require my permission. You can't just go and take a program I have written, the IPR/Copyright of which is owned by me, and turn it into an add-in utility without seeking my approval!
Richard.
|
|
Logged
|
|
|
|
David Williams
Developer
member is offline

meh

Gender: 
Posts: 452
|
 |
Re: PROFILER UTILITY
« Reply #10 on: May 7th, 2009, 3:25pm » |
|
on May 7th, 2009, 2:37pm, Richard Russell wrote:I don't want to be a wet blanket here, but I feel I should point out that adapting BBC2HTML.BBC, not being one of the supplied example programs, would require my permission. You can't just go and take a program I have written, the IPR/Copyright of which is owned by me, and turn it into an add-in utility without seeking my approval!
Richard. |
|
Sorry, it was rather presumptuous of me!
|
|
Logged
|
|
|
|
Michael Hutton
Developer
member is offline


Gender: 
Posts: 248
|
 |
Re: PROFILER UTILITY
« Reply #11 on: May 22nd, 2009, 11:23am » |
|
Hi all,
You can run the installer by clicking on this link and choosing RUN.
http://tech.groups.yahoo.com/group/bb4w/files/Tools/Add_Ins/Profiler%20Utility%20Installer.exe
For those of you who are aware of the previous versions potentially lethal bug this has been fixed by using an updated version of the bbwrun.exe provided by Richard. So, DO NOT BE AFRAID!
To use profiler just select the item from the Utilities menu. You should see a dialogue box appear with a few options. In brief:
Autoclose : Enter a timeout value for the profiling to exit. A value of 0 indicates that there is no timeout value and the program will profile indefinitely...see 'exit conditions' below.
Do not time INPUT statements : Profiler will ignore INPUT statements and not time them when profiling.
Profiler will automatically stop the profiling and show you a report when:
1. The timeout limit has been reached. 2. An END or QUIT statement has been encountered. (a STOP will bail to immediate mode see 3) 3. When immediate mode is detected. 4. The user clicks on the close button in the window (if your using full screen use Alt-f4).
I haven't encountered a situation where this version will not exit in immediate mode but if anyone does find this or it seems 'stuck' when an INPUT statemant, click the close button and then press ENTER. This is similar behaviour to the original profiler.
The profile report will be shown in your default text editor. The file will not be saved unless you do so manually. (it is created in the temp directory.)
There have been other minor bug fixes including the 'Division by zero' error encountered when the program was so small that no time was registered by Profiler.
I have noticed that *rarely* profiler will not show a report when the program being profiled is deep within a machine code procedure (I think). I think this is due to so many WM_QUIT messages being sent that it will close itself before it's had time to compile the report and show it! As the first thing Profiler does is stop the timer when it has encountered a stop condition I haven't really worked out a way of stopping this behaviour yet. Although I could stop it within the timer itself...<will go away and do this....>. However, I think it is satisfactory for 99.9% of situations.
Also the installer might not recongise previous versions (you shouldn't have them anyway!) but just select the same slot if this does occur.
As per usual please report any bugs or irritations.
Enjoy profiling! I hope it helps to speed up your code.
Michael
|
|
Logged
|
|
|
|
admin
Administrator
member is offline


Posts: 1145
|
 |
Re: PROFILER UTILITY
« Reply #12 on: May 27th, 2009, 2:47pm » |
|
Quote:| As per usual please report any bugs or irritations. |
|
If I try to install your latest Profiler Utility I get this message in a box entitled 'Access Denied':
"Sorry, you are not allowed to write to this folder. You will have to change your access rights to this folder then run this installer again".
Unfortunately, it doesn't tell me which folder I need to change the access rights to (nor why, since I wouldn't be expecting it to write to a folder that doesn't have write access).
Also, for your information, the message box was displayed behind other windows - only the 'bong' alerted me to a problem. You should perhaps check that you have set the 'parent window' of the box correctly. Or maybe consider setting the MB_TOPMOST flag.
Richard.
|
| « Last Edit: May 27th, 2009, 2:48pm by admin » |
Logged
|
|
|
|
Michael Hutton
Developer
member is offline


Gender: 
Posts: 248
|
 |
Re: PROFILER UTILITY
« Reply #13 on: Jun 2nd, 2009, 10:26am » |
|
The 'Access Denied' Updating bug has been fixed for those of you who would like to try Profiler.
Also, I would recommend using the Install/Remove/Update tool to remove Profiler. If you just delete the files you will leave the registry entries behind which could confuse any further attempts to upgrade etc.
Michael
|
|
Logged
|
|
|
|
admin
Administrator
member is offline


Posts: 1145
|
 |
Re: PROFILER UTILITY
« Reply #14 on: Jun 2nd, 2009, 1:49pm » |
|
Quote:| Also, I would recommend using the Install/Remove/Update tool to remove Profiler. |
|
Can you confirm that it's equally acceptable to use the Remove option in Malcolm's Utilities Manager? I think it's most important that utilities from different vendors properly coöperate.
By the time the average user decides they want to remove your utility (possibly a long time after they first installed it) they're unlikely to remember that they're supposed to use a particular software tool to do it. Even if they do, they've got to remember what it's called and where they stored it (and if, like me, they run it directly from the Yahoo group's Files area it won't be on their PC anyway).
If for some reason you cannot make your utility compatible with Utilities Manager (which seems unlikely) a less desirable alternative would be to put an entry in the Add or Remove Programs list in Control Panel so it can be removed in the same way as other Windows applications.
Richard.
|
|
Logged
|
|
|
|
Michael Hutton
Developer
member is offline


Gender: 
Posts: 248
|
 |
Re: PROFILER UTILITY
« Reply #15 on: Jun 5th, 2009, 08:12am » |
|
I'll look into this when I get back to Oz. I agree that it would better to make it compatible.
Michael
|
|
Logged
|
|
|
|
admin
Administrator
member is offline


Posts: 1145
|
 |
Re: PROFILER UTILITY
« Reply #16 on: Jun 5th, 2009, 09:26am » |
|
Quote:| I'll look into this when I get back to Oz. I agree that it would better to make it compatible. |
|
You might like to look at how my recently-released Macro Recorder utility behaves in this respect. It has two features in particular that help compatibility with Malcolm's utility:
Firstly, it always uses the presence (or otherwise) of its name in the 'utilities list' (in the registry) as the primary test of whether it has previously been installed. Therefore it will never think it's already installed if the user has managed to delete it from this list (by any means), or think it isn't installed when it's in the list.
Secondly, it will install correctly even if its files and/or registry entries are missing or inconsistent. It always presents the option to install afresh at any slot number, even if it believes it is already installed. Therefore whatever the previous condition the user can decide to re-install it in its existing slot (i.e. upgrade), move it to a new slot or remove it entirely (the 'remove' option is only enabled if it is found in the existing list).
Second-guessing the user, by presenting only a subset of options depending on what the installer (unreliably) believes is the existing condition (e.g. offering only 'remove' if thinks it is already installed) is poor practice and liable to result in a high degree of user frustration!
Richard.
|
|
Logged
|
|
|
|
flamerz
New Member
member is offline


Posts: 2
|
 |
Re: PROFILER UTILITY
« Reply #17 on: May 1st, 2013, 2:17pm » |
|
I have installed BBC 5.94a and Profiler 3.0d.
When I have some code and start the profiler, it starts with a "Mistake", and i have to write "Run" manually.
I'm doing something wrong?
Currently using windows 7.
The link for the v4 beta is missing.
update: this only happens when i use the "lowercase keywords" option.
|
| « Last Edit: May 1st, 2013, 3:35pm by flamerz » |
Logged
|
|
|
|
admin
Administrator
member is offline


Posts: 1145
|
 |
Re: PROFILER UTILITY
« Reply #18 on: May 2nd, 2013, 08:15am » |
|
on May 1st, 2013, 2:17pm, flamerz wrote:When I have some code and start the profiler, it starts with a "Mistake", and i have to write "Run" manually.
I'm doing something wrong? |
|
I don't know whether Michael Hutton (the author of the profiler utility) is monitoring this forum any more. Unfortunately he has never released the source code, so really he is the only person who can comment on your problem.
I know from experience that it's easy to forget to test utilities with the Lowercase Keywords option enabled, so it may be that is what has happened.
Richard.
|
|
Logged
|
|
|
|
Michael Hutton
Developer
member is offline


Gender: 
Posts: 248
|
 |
Re: PROFILER UTILITY
« Reply #19 on: May 4th, 2013, 12:11pm » |
|
on May 2nd, 2013, 08:15am, Richard Russell wrote:I don't know whether Michael Hutton (the author of the profiler utility) is monitoring this forum any more. |
|
I get some emails about certain topics, but I don't regularly scan the board anymore.
Quote:When I have some code and start the profiler, it starts with a "Mistake", and i have to write "Run" manually.
I'm doing something wrong? |
|
Yes. Using lowercase keywords.
No, but seriously you have found a bug which had never cropped up during testing and I had never tested for, or even, thought about.
When you run the profiler utility it runs a separate .exe which is passed the window handle of the requesting IDE. The program is then tokenized line by line by sending the exe each line via the window messages and saved as a temporary *tokenized* program and then reloaded back into the memory of the profiler and then run in that environment.
The problem lies in the tokenization of the program.
Code:
1190 Dummy% = EVAL("0:"+$$(buffer%+5))
1200 Line$ = $(!332+2)
the EVAL statement won't recognise the keywords as it stands unless I explicitly state that they are lowercase.
I don't know if I can test the IDE from another program to see if bit 3 of ?419 is set (*LOWERCASE ON) but I will mess around and see if I can do it.
I expect it cannot be done so it might just be the case that you can only profile a program in the IDE which is not in lowercase.
Sorry about that.
Quote:| Unfortunately he has never released the source code.. |
|
I have always been willing but I remember at the time there was some concern about some of the code in which all the utilities use. Is that still a concern? I know you Richard have seen the code and may still have a copy of it lying around but I don't know.
Is there any objection to me posting it?
Michael
|
|
Logged
|
|
|
|
admin
Administrator
member is offline


Posts: 1145
|
 |
Re: PROFILER UTILITY
« Reply #20 on: May 4th, 2013, 9:48pm » |
|
on May 4th, 2013, 12:11pm, Michael Hutton wrote:| I don't know if I can test the IDE from another program to see if bit 3 of ?419 is set |
|
Other utilities which need to know the 'lowercase keywords' setting (the Cross Reference utility is one) simply look in the registry to find it:
Code: key$ = "Software\R T Russell\BBC BASIC for Windows\Settings"
IF FNreadregistrybin(HKEY_CURRENT_USER, key$, "Lowercase", ^Lowercase%, 4)
IF Lowercase% THEN *lowercase on Quote:| there was some concern about some of the code in which all the utilities use. Is that still a concern? |
|
Looking back through this thread the concern seemed to be about compatibility with Malcolm's 'My Utilities' manager, in particular that the profiler is happy to be removed (without confusing a subsequent re-installation) and moved from one slot to another using that tool. So long as that is the case I can't see there being a problem.
Incidentally I vaguely remember an issue (possibly with an older version) related to the profiler using its own copy of the run-time engine, which if an older version than the one being used by the IDE can result in all sorts of strange symptoms, because profiling the program means effectively running it with an old version of BB4W! Is that fixed?
Oh, and the profiler utility doesn't seem to work at all on 64-bit Windows! That's obviously a very serious problem, given that almost every PC bought today will be running Win64, so it ought to be a high priority for being fixed if you're doing any work.
Quote:| I know you Richard have seen the code and may still have a copy of it lying around but I don't know. |
|
No, I've never seen the code; if you ever gave me a copy, and I don't think you did, I've long since lost it. That was my main concern really; I wouldn't necessarily expect you to publish the source - I don't do that for any of my utilities - but it is the only one of the utilities distributed with BB4W that I have no way of maintaining.
Richard.
|
|
Logged
|
|
|
|
Michael Hutton
Developer
member is offline


Gender: 
Posts: 248
|
 |
Re: PROFILER UTILITY
« Reply #21 on: May 5th, 2013, 2:44pm » |
|
No, it doesn't use it's own run time engine anymore. It is compiled with the latest, or is it, hmm. how would I know? Anyway, I am sure it is not the special version of the runtime engine which was required because of some nasty tricks like flushing the @lib$ and @dir$ buffers could lead to whole folders being deleted for some reason. However this is now *not\8 an issue.
So you can find out the lowercase keywords via the registry.
I am will upload the code to the yahoo groups so that it could be updated by anyone who wishes. I don't think I would add to it anymore, except for the lowercase keywords stuff.
Michael
|
|
Logged
|
|
|
|
Michael Hutton
Developer
member is offline


Gender: 
Posts: 248
|
 |
Re: PROFILER UTILITY
« Reply #22 on: May 5th, 2013, 2:59pm » |
|
I have never had a problem with the 64 bit windows. What do you experience?
Michael
|
|
Logged
|
|
|
|
Michael Hutton
Developer
member is offline


Gender: 
Posts: 248
|
 |
Re: PROFILER UTILITY
« Reply #23 on: May 5th, 2013, 4:19pm » |
|
Can I "borrow" the FNreadregistrybin function please?
Michael
|
|
Logged
|
|
|
|
|