[fpc-pascal] Re: FPC and Profiling software

2008-03-13 Thread Graeme Geldenhuys
Hi, Doing some searching in the mailing list archives it seems I can use 'gprof' for profiling. Anybody got a tutorial or wiki page explaining it's usage with FPC programs? Graeme. On 13/03/2008, Graeme Geldenhuys <[EMAIL PROTECTED]> wrote: > Hi, > > Does anybody know of any profiling softwar

[fpc-pascal] Firebird UDF

2008-03-13 Thread Codebue Fabio - P-Soft
This is my UDF source library pudf; {$mode objfpc}{$H+} uses Classes; function pround(var valore: real; ndec: integer):real;export; var i: integer; risultato: real; ndivisore: integer; begin risultato:= valore; ndivisore:= 1; for i:= 1 to ndec do begin risulta

Re: [fpc-pascal] gprof setup on windows

2008-03-13 Thread Graeme Geldenhuys
On 02/11/2007, Darius Blaszijk <[EMAIL PROTECTED]> wrote: > I would like to profile my code on windows. I tried searching the wiki, > but without much success on how to do that on windows. Can anyone > explain me in a few words how this can be done? Did you ever find any information. I would li

Re: [fpc-pascal] gprof

2008-03-13 Thread Graeme Geldenhuys
Has the '-pg' (gprof) compiler option issues ever been resolved under Linux? After running my application the gprof.out file is only 186 bytes big with no profiling information. Regards, - Graeme - On 02/10/2007, Jonas Maebe <[EMAIL PROTECTED]> wrote: > > On 02 Oct 2007, at 00:43, Mattias

Re: [fpc-pascal] gprof

2008-03-13 Thread Jonas Maebe
On 13 Mar 2008, at 09:15, Graeme Geldenhuys wrote: Has the '-pg' (gprof) compiler option issues ever been resolved under Linux? I' not sure, but I don't think so. Under Linux, you can however also use valgrind with the cachegrind backend for profiling (but in this case ensure that your

Re: [fpc-pascal] Firebird UDF

2008-03-13 Thread Michael Van Canneyt
On Thu, 13 Mar 2008, Codebue Fabio - P-Soft wrote: > This is my UDF source > > library pudf; > {$mode objfpc}{$H+} > uses > Classes; > > function pround(var valore: real; ndec: integer):real;export; > var > i: integer; > risultato: real; > ndivisore: integer; > begin > r

[fpc-pascal] RE: FPC and Profiling software

2008-03-13 Thread Jeff Pohlmeyer
Graeme Geldenhuys wrote: > I'm trying to detect where bottlenecks occur in my code. On Linux, you can get some interesting information with something like this: % valgrind --tool=callgrind [YOUR_APP] [YOUR_ARGS] % callgrind_annotate --auto=yes --inclusive=yes > callgrind.log And then have a l

[fpc-pascal] RE: Firebird UDF

2008-03-13 Thread Crause, Christo (JC)
> From: "Codebue Fabio - P-Soft" ... > function pround(var valore: real; ndec: integer):real;export; ... > DECLARE EXTERNAL FUNCTION pround > DOUBLE PRECISION, INTEGER > RETURNS DOUBLE PRECISION BY VALUE > ENTRY_POINT 'pround' MODULE_NAME 'pudf'; > > if I use it with an instruction like this

RE: [fpc-pascal] Firebird UDF

2008-03-13 Thread Codebue Fabio - P-Soft
I create a pudf.dll library an put in UDF subdirectory of firebird installation (where you can find other UDFs) after this I use IBExpert to run the script DECLARE EXTERNAL FUNCTION pround DOUBLE PRECISION, INTEGER RETURNS DOUBLE PRECISION BY VALUE ENTRY_POINT 'pround' MODULE_NAME 'pudf'; i

RE: [fpc-pascal] Firebird UDF

2008-03-13 Thread Michael Van Canneyt
On Thu, 13 Mar 2008, Codebue Fabio - P-Soft wrote: > I create a pudf.dll library an put in UDF subdirectory of firebird > installation (where you can find other UDFs) > > after this I use IBExpert to run the script > > DECLARE EXTERNAL FUNCTION pround > DOUBLE PRECISION, INTEGER > RETURNS D

RE: [fpc-pascal] Firebird UDF

2008-03-13 Thread Codebue Fabio - P-Soft
I try with pudf.dll module name, I try to change function name ... I try a lot of things... sigh a so stupid UDF, and I can't create it... mmm I'm using firebird 2.0.3 in windows vista environment. pudf was compiled with fpc 2.0.4 and created with lazarus 0.9.22 sigh! Codebue Fabio .--

Re: [fpc-pascal] RE: FPC and Profiling software

2008-03-13 Thread Graeme Geldenhuys
Thanks Jeff. That seems to work fine with my project under Linux. Now I only need to learn the format and meaning of all the numbers in callgrind.log file. But I'm sure the website or man pages will give info on that. Thanks again... Regards, - Graeme - On 13/03/2008, Jeff Pohlmeyer <[EMAI

Re: [fpc-pascal] gprof

2008-03-13 Thread Graeme Geldenhuys
On 13/03/2008, Jonas Maebe <[EMAIL PROTECTED]> wrote: > > I' not sure, but I don't think so. Under Linux, you can however also > use valgrind with the cachegrind backend for profiling (but in this > case ensure that your program and the units you want to profile are > compiled with -gv, and that

Re: [fpc-pascal] Firebird UDF

2008-03-13 Thread Stephano
Codebue Fabio - P-Soft wrote: This is my UDF source library pudf; {$mode objfpc}{$H+} uses Classes; function pround(var valore: real; ndec: integer):real;export; var i: integer; risultato: real; ndivisore: integer; begin risultato:= valore; ndivisore:= 1; for i:= 1 t

RE: [fpc-pascal] Firebird UDF

2008-03-13 Thread Codebue Fabio - P-Soft
nothing todo... ok restart: library pudf; {$mode objfpc}{$H+} uses Classes, p_func in 'p_func.pas'; exports pround name 'p_round'; {$R pudf.res} begin // DECLARE EXTERNAL FUNCTION pround // DOUBLE PRECISION, INTEGER // RETURNS DOUBLE PRECISION BY VALUE // ENTRY_POINT 'pudf_pround'

Re: [fpc-pascal] RE: FPC and Profiling software

2008-03-13 Thread bartek
On Thursday 13 March 2008 11:26:49 Graeme Geldenhuys wrote: > Thanks Jeff. > > That seems to work fine with my project under Linux. Now I only need > to learn the format and meaning of all the numbers in callgrind.log > file. But I'm sure the website or man pages will give info on that. kcachegr

Re: [fpc-pascal] Firebird UDF

2008-03-13 Thread Stephano
Codebue Fabio - P-Soft wrote: nothing todo... ok restart: library pudf; {$mode objfpc}{$H+} uses Classes, p_func in 'p_func.pas'; exports pround name 'p_round'; {$R pudf.res} begin // DECLARE EXTERNAL FUNCTION pround // DOUBLE PRECISION, INTEGER // RETURNS DOUBLE PRECISION BY VAL

RE: [fpc-pascal] Firebird UDF

2008-03-13 Thread Codebue Fabio - P-Soft
Codebue Fabio .-. _ \ __| _|| __/|\__ \ _ \ _| _| _| /\___/_| \__| P-Soft di Codebue Fabio & C. sas via B.Storti, 19 24060 - Chiuduno - BG Italy Phone: +39.030.839435 Fax: +39.030.5100306 Mobile: +39.348.3515786 .

RE: [fpc-pascal] Firebird UDF

2008-03-13 Thread Codebue Fabio - P-Soft
I register my udfp with command DECLARE EXTERNAL FUNCTION pround DOUBLE PRECISION, INTEGER RETURNS DOUBLE PRECISION BY VALUE ENTRY_POINT 'pudf_p_round' MODULE_NAME 'pudf'; and test with this sql select round(123.1233, 2) as nrounded from rdb$database returning error Invalid token. inv

Re: [fpc-pascal] gprof setup on windows

2008-03-13 Thread Peter Vreman
> On 02/11/2007, Darius Blaszijk <[EMAIL PROTECTED]> wrote: >> I would like to profile my code on windows. I tried searching the wiki, >> but without much success on how to do that on windows. Can anyone >> explain me in a few words how this can be done? > > Did you ever find any information. I