µTrying to compile gst for profiling

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

µTrying to compile gst for profiling

Mathieu Suen-2
Hi,


I try to build a gst with profiling information.
So I configure gst with:

./configure CFLAGS=-pg

and make give me thix error:

gcc: -pg and -fomit-frame-pointer are incompatible


I guess I should remove the oprion -fomit-frame-pointer but
I don't know the right way of doing it.
Is there a way to compile gst with profiling information?

Thanks


--Mathieu




_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: µTrying to compile gst for profiling

Paolo Bonzini-2
On 06/03/2010 10:54 AM, Mathieu Suen wrote:

> Hi,
>
>
> I try to build a gst with profiling information.
> So I configure gst with:
>
> ./configure CFLAGS=-pg
>
> and make give me thix error:
>
> gcc: -pg and -fomit-frame-pointer are incompatible
>
>
> I guess I should remove the oprion -fomit-frame-pointer but
> I don't know the right way of doing it.
> Is there a way to compile gst with profiling information?

Try this:

diff --git a/configure.ac b/configure.ac
index b9f4b43..fc2ce06 100644
--- a/configure.ac
+++ b/configure.ac
@@ -264,8 +264,9 @@
       AC_MSG_ERROR([GNU Smalltalk requires GCC 3.3 or later.]) ;;
  esac

-case $host_cpu in
-   i*86) LIBGST_CFLAGS='-fomit-frame-pointer' ;;
+case '$host_cpu: $CFLAGS ' in
+   i*86:*' -pg '*) ;;
+   i*86:*) LIBGST_CFLAGS='-fomit-frame-pointer' ;;
     *) ;;
  esac
  AC_SUBST(LIBGST_CFLAGS)


If you're on the Mac, however, I would use Shark.  Much simpler and much
more powerful.

Paolo

_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re : [Help-smalltalk] µTrying to compile gst for profiling

Mathieu Suen-2

Thanks Paolo.

For now on I have only access to an ubuntu machine.
I will try with Shark back home.

With kcachegrind at a first glance I got a total of self cost

~2 for comp.c, gst-parse.c, lex.c
~26 for interp.c, interp_bc.inl,

Not sure what is the unit but a time unit for sure.
I also have many other file but it is not sure whether to include them in the compiler or the interpreter.
(alloc.c, callin.c, dict.c(~4 time unit), input.c(~3 time unit), oop.c(~20 time unit), prims.def (~18 time unit)...)

I also got some <cycle 3> which take ~28 time unit.
I don't know to what it correspond.




----- Message d'origine ----
De : Paolo Bonzini <[hidden email]>
À : Mathieu Suen <[hidden email]>
Cc : [hidden email]
Envoyé le : Jeu 3 juin 2010, 14h 12min 57s
Objet : Re: [Help-smalltalk] µTrying to compile gst for profiling

On 06/03/2010 10:54 AM, Mathieu Suen wrote:

> Hi,
>
>
> I try to build a gst with profiling information.
> So I configure gst with:
>
> ./configure CFLAGS=-pg
>
> and make give me thix error:
>
> gcc: -pg and -fomit-frame-pointer are incompatible
>
>
> I guess I should remove the oprion -fomit-frame-pointer but
> I don't know the right way of doing it.
> Is there a way to compile gst with profiling information?

Try this:

diff --git a/configure.ac b/configure.ac
index b9f4b43..fc2ce06 100644
--- a/configure.ac
+++ b/configure.ac
@@ -264,8 +264,9 @@
       AC_MSG_ERROR([GNU Smalltalk requires GCC 3.3 or later.]) ;;
  esac

-case $host_cpu in
-   i*86) LIBGST_CFLAGS='-fomit-frame-pointer' ;;
+case '$host_cpu: $CFLAGS ' in
+   i*86:*' -pg '*) ;;
+   i*86:*) LIBGST_CFLAGS='-fomit-frame-pointer' ;;
     *) ;;
  esac
  AC_SUBST(LIBGST_CFLAGS)


If you're on the Mac, however, I would use Shark.  Much simpler and much
more powerful.

Paolo





_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Re : [Help-smalltalk] µTrying to compile gst for profiling

Eli Green-5
"Instruments" is even easier to use than Shark (and Shark will not
work if you're running the 64-bit kernel). It's Apple's GUI to DTrace.
It does not instrument the code, using sampling instead, so it may not
be quite as accurate but over long runs should still produce useful
results. It can also profile memory leaks, file access, network
access, etc.

On Thu, Jun 3, 2010 at 17:31, Mathieu Suen <[hidden email]> wrote:

>
> Thanks Paolo.
>
> For now on I have only access to an ubuntu machine.
> I will try with Shark back home.
>
> With kcachegrind at a first glance I got a total of self cost
>
> ~2 for comp.c, gst-parse.c, lex.c
> ~26 for interp.c, interp_bc.inl,
>
> Not sure what is the unit but a time unit for sure.
> I also have many other file but it is not sure whether to include them in the compiler or the interpreter.
> (alloc.c, callin.c, dict.c(~4 time unit), input.c(~3 time unit), oop.c(~20 time unit), prims.def (~18 time unit)...)
>
> I also got some <cycle 3> which take ~28 time unit.
> I don't know to what it correspond.
>
>
>
>
> ----- Message d'origine ----
> De : Paolo Bonzini <[hidden email]>
> À : Mathieu Suen <[hidden email]>
> Cc : [hidden email]
> Envoyé le : Jeu 3 juin 2010, 14h 12min 57s
> Objet : Re: [Help-smalltalk] µTrying to compile gst for profiling
>
> On 06/03/2010 10:54 AM, Mathieu Suen wrote:
>> Hi,
>>
>>
>> I try to build a gst with profiling information.
>> So I configure gst with:
>>
>> ./configure CFLAGS=-pg
>>
>> and make give me thix error:
>>
>> gcc: -pg and -fomit-frame-pointer are incompatible
>>
>>
>> I guess I should remove the oprion -fomit-frame-pointer but
>> I don't know the right way of doing it.
>> Is there a way to compile gst with profiling information?
>
> Try this:
>
> diff --git a/configure.ac b/configure.ac
> index b9f4b43..fc2ce06 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -264,8 +264,9 @@
>       AC_MSG_ERROR([GNU Smalltalk requires GCC 3.3 or later.]) ;;
>  esac
>
> -case $host_cpu in
> -   i*86) LIBGST_CFLAGS='-fomit-frame-pointer' ;;
> +case '$host_cpu: $CFLAGS ' in
> +   i*86:*' -pg '*) ;;
> +   i*86:*) LIBGST_CFLAGS='-fomit-frame-pointer' ;;
>     *) ;;
>  esac
>  AC_SUBST(LIBGST_CFLAGS)
>
>
> If you're on the Mac, however, I would use Shark.  Much simpler and much
> more powerful.
>
> Paolo
>
>
>
>
>
> _______________________________________________
> help-smalltalk mailing list
> [hidden email]
> http://lists.gnu.org/mailman/listinfo/help-smalltalk
>

_______________________________________________
help-smalltalk mailing list
[hidden email]
http://lists.gnu.org/mailman/listinfo/help-smalltalk