Purefiler - An alternative profiler

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
jassing
Addict
Addict
Posts: 1885
Joined: Wed Feb 17, 2010 12:00 am

Re: Purefiler - An alternative profiler

Post by jassing »

I use it for F5 compile/run.
In the pb_editoroutput.pb file there is:

Code: Select all

;XIncludeFile "\src\purebasic\WinServiceControl.pbi"
;XIncludeFile "\src\purebasic\EmptyWorkingSet.pbi"

;XIncludeFile "GroupCheckIn.pbi"
! pushf
! pushad
and later

Code: Select all

! popf
    EmptyWorkingSet()
! pushf
Perhaps it has something to do with the relative (not a full path) reference?
eesau
Enthusiast
Enthusiast
Posts: 589
Joined: Fri Apr 27, 2007 12:38 pm
Location: Finland

Re: Purefiler - An alternative profiler

Post by eesau »

Code: Select all

---------------------------
PureBasic
---------------------------
Line 3424: Only 'Case', 'Default' or 'EndSelect' are expected after 'Select'.
---------------------------
OK   
---------------------------
I get the following error code when running Purefiler. The original source is way way too big to post, but it looks like Purefiler inserts lines outside cases in a select statement. Like so:

Code: Select all

		Select Op
! pushf
! pushad
purefiler_AddStartEntry(4, 386, 1, #False)
! popad
! popf
		
! pushf
! pushad
purefiler_AddStopEntry(4, 386, 1, #False)
! popad
! popf
			Case "+" 
! pushf
! pushad
purefiler_AddStopEntry(4, 385, 1, #True)
! popad
! popf
 ProcedureReturn StrF(ValueL + ValueR, 4)
			Case "-" 
! pushf
! pushad
eesau
Enthusiast
Enthusiast
Posts: 589
Joined: Fri Apr 27, 2007 12:38 pm
Location: Finland

Re: Purefiler - An alternative profiler

Post by eesau »

Holy crap! Purefiler just made a 1.5 GB file in its folder. What is it? Trace log file? When I run the exe to see the log it just hangs.

*Edit*

Okay, that trace file was seriously too big. I was able to make a smaller one, about 6.5 Megs but now Purefiler crashes every time I open the file.
User avatar
Didelphodon
PureBasic Expert
PureBasic Expert
Posts: 450
Joined: Sat Dec 18, 2004 11:56 am
Location: Vienna - Austria
Contact:

Re: Purefiler - An alternative profiler

Post by Didelphodon »

jassing wrote:I use it for F5 compile/run.
In the pb_editoroutput.pb file there is:

Code: Select all

;XIncludeFile "\src\purebasic\WinServiceControl.pbi"
;XIncludeFile "\src\purebasic\EmptyWorkingSet.pbi"

;XIncludeFile "GroupCheckIn.pbi"
! pushf
! pushad
and later

Code: Select all

! popf
    EmptyWorkingSet()
! pushf
Perhaps it has something to do with the relative (not a full path) reference?
I never tested it for use with F5 - I simply dont know how it behaves in this scenario -> have to check ...
Go, tell it on the mountains.
User avatar
Didelphodon
PureBasic Expert
PureBasic Expert
Posts: 450
Joined: Sat Dec 18, 2004 11:56 am
Location: Vienna - Austria
Contact:

Re: Purefiler - An alternative profiler

Post by Didelphodon »

eesau wrote:

Code: Select all

---------------------------
PureBasic
---------------------------
Line 3424: Only 'Case', 'Default' or 'EndSelect' are expected after 'Select'.
---------------------------
OK   
---------------------------
I get the following error code when running Purefiler. The original source is way way too big to post, but it looks like Purefiler inserts lines outside cases in a select statement. Like so:

Code: Select all

		Select Op
! pushf
! pushad
purefiler_AddStartEntry(4, 386, 1, #False)
! popad
! popf
		
! pushf
! pushad
purefiler_AddStopEntry(4, 386, 1, #False)
! popad
! popf
			Case "+" 
! pushf
! pushad
purefiler_AddStopEntry(4, 385, 1, #True)
! popad
! popf
 ProcedureReturn StrF(ValueL + ValueR, 4)
			Case "-" 
! pushf
! pushad
Thx for the report - this is something that should not happen and is definitely an issue. Will have a look at ...
Go, tell it on the mountains.
User avatar
Didelphodon
PureBasic Expert
PureBasic Expert
Posts: 450
Joined: Sat Dec 18, 2004 11:56 am
Location: Vienna - Austria
Contact:

Re: Purefiler - An alternative profiler

Post by Didelphodon »

eesau wrote:Holy crap! Purefiler just made a 1.5 GB file in its folder. What is it? Trace log file? When I run the exe to see the log it just hangs.

*Edit*

Okay, that trace file was seriously too big. I was able to make a smaller one, about 6.5 Megs but now Purefiler crashes every time I open the file.
Such huge logs are absolutely possible. Purefiler collects a lot of informations per instruction and loops can produce a lot of log-records indeed.

However, there shouldnt be a crash of course - can you please be more specific about the crash you mentioned?
Go, tell it on the mountains.
eesau
Enthusiast
Enthusiast
Posts: 589
Joined: Fri Apr 27, 2007 12:38 pm
Location: Finland

Re: Purefiler - An alternative profiler

Post by eesau »

Didelphodon wrote:
eesau wrote:Holy crap! Purefiler just made a 1.5 GB file in its folder. What is it? Trace log file? When I run the exe to see the log it just hangs.

*Edit*

Okay, that trace file was seriously too big. I was able to make a smaller one, about 6.5 Megs but now Purefiler crashes every time I open the file.
Such huge logs are absolutely possible. Purefiler collects a lot of informations per instruction and loops can produce a lot of log-records indeed.

However, there shouldnt be a crash of course - can you please be more specific about the crash you mentioned?
It was a real-time application, so it wasn't so strange after all. I guess I let it run for a moment too long :)

Hard to say about the crash, I start Purefiler and load the file, the progress bar progresses and once its at 100% Purefiler just crashes.
User avatar
Didelphodon
PureBasic Expert
PureBasic Expert
Posts: 450
Joined: Sat Dec 18, 2004 11:56 am
Location: Vienna - Austria
Contact:

Re: Purefiler - An alternative profiler

Post by Didelphodon »

eesau wrote:

Code: Select all

---------------------------
PureBasic
---------------------------
Line 3424: Only 'Case', 'Default' or 'EndSelect' are expected after 'Select'.
---------------------------
OK   
---------------------------
I get the following error code when running Purefiler. The original source is way way too big to post, but it looks like Purefiler inserts lines outside cases in a select statement. Like so:

Code: Select all

		Select Op
! pushf
! pushad
purefiler_AddStartEntry(4, 386, 1, #False)
! popad
! popf
		
! pushf
! pushad
purefiler_AddStopEntry(4, 386, 1, #False)
! popad
! popf
			Case "+" 
! pushf
! pushad
purefiler_AddStopEntry(4, 385, 1, #True)
! popad
! popf
 ProcedureReturn StrF(ValueL + ValueR, 4)
			Case "-" 
! pushf
! pushad
Fixed!
(New version is online)
Go, tell it on the mountains.
User avatar
Didelphodon
PureBasic Expert
PureBasic Expert
Posts: 450
Joined: Sat Dec 18, 2004 11:56 am
Location: Vienna - Austria
Contact:

Re: Purefiler - An alternative profiler

Post by Didelphodon »

Didelphodon wrote:
jassing wrote:I use it for F5 compile/run.
In the pb_editoroutput.pb file there is:

Code: Select all

;XIncludeFile "\src\purebasic\WinServiceControl.pbi"
;XIncludeFile "\src\purebasic\EmptyWorkingSet.pbi"

;XIncludeFile "GroupCheckIn.pbi"
! pushf
! pushad
and later

Code: Select all

! popf
    EmptyWorkingSet()
! pushf
Perhaps it has something to do with the relative (not a full path) reference?
I never tested it for use with F5 - I simply dont know how it behaves in this scenario -> have to check ...
F5 works! Tried it.
Besides this I found out that it's most likely that your include hasn't been read succesfully. Please try the latest version (just uploaded) which gives more details like the actual name of the file it tried to read. You can search for "!!!" in the pb_editoroutput.pb to find it - please post this lines here then.
Go, tell it on the mountains.
jassing
Addict
Addict
Posts: 1885
Joined: Wed Feb 17, 2010 12:00 am

Re: Purefiler - An alternative profiler

Post by jassing »

...but if the file isn't "read properly" -- how does it run / compile w/o purefiler?


I updated the exe, hit f5 - got the error message, then did :
type pb_compiler | find "!!!"

two lines showed up -- and both are lines I wrote... nothing extra. same exact error.

fwiw: I had a similar problem before, on a completely different system (both physically, logically, code being compiled, PB Version, OS, including bit level)
User avatar
Didelphodon
PureBasic Expert
PureBasic Expert
Posts: 450
Joined: Sat Dec 18, 2004 11:56 am
Location: Vienna - Austria
Contact:

Re: Purefiler - An alternative profiler

Post by Didelphodon »

jassing wrote:...but if the file isn't "read properly" -- how does it run / compile w/o purefiler?


I updated the exe, hit f5 - got the error message, then did :
type pb_compiler | find "!!!"

two lines showed up -- and both are lines I wrote... nothing extra. same exact error.

fwiw: I had a similar problem before, on a completely different system (both physically, logically, code being compiled, PB Version, OS, including bit level)
would you mind sharing the pre-compilation-file with me? you can send it to me via pm or drop me an email.
Go, tell it on the mountains.
User avatar
Didelphodon
PureBasic Expert
PureBasic Expert
Posts: 450
Joined: Sat Dec 18, 2004 11:56 am
Location: Vienna - Austria
Contact:

Re: Purefiler - An alternative profiler

Post by Didelphodon »

jassing wrote:I use it for F5 compile/run.
In the pb_editoroutput.pb file there is:

Code: Select all

;XIncludeFile "\src\purebasic\WinServiceControl.pbi"
;XIncludeFile "\src\purebasic\EmptyWorkingSet.pbi"

;XIncludeFile "GroupCheckIn.pbi"
! pushf
! pushad
and later

Code: Select all

! popf
    EmptyWorkingSet()
! pushf
Perhaps it has something to do with the relative (not a full path) reference?
tried a few scenarios with relative paths - everything works fine here. but imho you shouldnt start a relative path with a "\", though.
Go, tell it on the mountains.
sec
Enthusiast
Enthusiast
Posts: 792
Joined: Sat Aug 09, 2003 3:13 am
Location: 90-61-92 // EU or ASIA
Contact:

Re: Purefiler - An alternative profiler

Post by sec »

Sorry, but i have SuperServ.pb. How i use Purefiler with SuperServ.pb?

Thanks
User avatar
Didelphodon
PureBasic Expert
PureBasic Expert
Posts: 450
Joined: Sat Dec 18, 2004 11:56 am
Location: Vienna - Austria
Contact:

Re: Purefiler - An alternative profiler

Post by Didelphodon »

sec wrote:Sorry, but i have SuperServ.pb. How i use Purefiler with SuperServ.pb?

Thanks
May I ask what "SuperServ.pb" is?
Go, tell it on the mountains.
jassing
Addict
Addict
Posts: 1885
Joined: Wed Feb 17, 2010 12:00 am

Re: Purefiler - An alternative profiler

Post by jassing »

found another issue: open a new tab in the IDE - past some code, now run it w/o saving it.

Regarding relative or '\' paths - Yea, I changed the paths to be a fullpath and made no difference.
it seems there is some limit w/in purefiler that just stops on large projects... oh well; I remember using it before and liked it, but it's not working here :(

Take care.
Cheers
-josh
Post Reply