Re: [commit: ghc] master: Add a new traceMarker# primop for use in profiling output (a609027)

Johan Tibell <[email protected]>
Newsgroups gmane.comp.lang.haskell.cvs.ghc
Message-ID <CAK-tuPaUTMDzxN79msakH7=gm9TLGFoLNoXtPrhvrtsH8_orCw@mail.gmail.com>
Could we have the primop take the length instead of requiring a
null-terminated string? That way we can more efficiently support using
the primops with ByteStrings or Texts without copying them just to add
a null terminator. Also, it's slightly safer to have explicit lengths.

On Mon, Oct 15, 2012 at 1:45 PM, Duncan Coutts
<[email protected]> wrote:
> Repository : ssh://darcs.haskell.org//srv/darcs/ghc
>
> On branch  : master
>
> http://hackage.haskell.org/trac/ghc/changeset/a609027da31c7c9103d8b9741ba3fc6807b7b7b9
>
>>---------------------------------------------------------------
>
> commit a609027da31c7c9103d8b9741ba3fc6807b7b7b9
> Author: Duncan Coutts <[email protected]>
> Date:   Mon Oct 15 00:52:32 2012 +0100
>
>     Add a new traceMarker# primop for use in profiling output
>
>     In time-based profiling visualisations (e.g. heap profiles and ThreadScope)
>     it would be useful to be able to mark particular points in the execution and
>     have those points in time marked in the visualisation.
>
>     The traceMarker# primop currently emits an event into the eventlog. In
>     principle it could be extended to do something in the heap profiling too.
>
>  compiler/prelude/primops.txt.pp |   11 +++++++++++
>  includes/rts/EventLogFormat.h   |    6 +++---
>  includes/stg/MiscClosures.h     |    1 +
>  rts/Linker.c                    |    1 +
>  rts/PrimOps.cmm                 |   25 +++++++++++++++++++++++++
>  rts/RtsProbes.d                 |    1 +
>  rts/Trace.c                     |   22 ++++++++++++++++++++++
>  rts/Trace.h                     |   10 ++++++++++
>  rts/eventlog/EventLog.c         |   23 +++++++++++++++++++++++
>  rts/eventlog/EventLog.h         |    2 ++
>  10 files changed, 99 insertions(+), 3 deletions(-)
>
>
> Diff suppressed because of size. To see it, use:
>
>     git show a609027da31c7c9103d8b9741ba3fc6807b7b7b9
>
> _______________________________________________
> Cvs-ghc mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/cvs-ghc
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.