RE: Profiling question

2003-01-06 Thread Simon Peyton-Jones
Not currently.  It's not clear what a point in execution *is*!
The top-level IO monad thread might provide such a point, but even then
it might not be clear how much of a lazy data structure had been
evaluated by that point.

I could see sense in having an I/O operation
markProfile :: String - IO ()
which would put a labelled vertical line on the profile to say when that
point was.

Simon

| -Original Message-
| From: Kirsten Chevalier [mailto:[EMAIL PROTECTED]]
| Sent: 03 January 2003 19:30
| To: [EMAIL PROTECTED]
| Subject: Profiling question
| 
| Hi,
| I'd like to be able to determine the percentage of allocated objects
of a
| particular type at specific points in a program's execution. I know
that I
| can use heap profiling to create a graph of memory usage broken down
by type,
| but is there any way to record this information at particular points
in the
| program (i.e., between two statements in a do-expression)?
| 
| Thanks,
| Kirsten
| 
| --
| Kirsten Chevalier * [EMAIL PROTECTED] * Often in error, never in
doubt
| ___
| Glasgow-haskell-users mailing list
| [EMAIL PROTECTED]
| http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users



Re: Profiling question

2003-01-06 Thread Malcolm Wallace
Kirsten Chevalier [EMAIL PROTECTED] writes:

 I'd like to be able to determine the percentage of allocated objects of
 a particular type at specific points in a program's execution. I know
 that I can use heap profiling to create a graph of memory usage broken
 down by type, but is there any way to record this information at
 particular points in the program (i.e., between two statements in a
 do-expression)?

If you were using nhc98, then you could use the following:

import NonStdProfile

f ... = do ...
   profile point A actionA
   profile point B actionB

The non-standard operation
profile :: String - a - a
places a labelled marker line on the profile graph at the time instant
when the value is demanded.

I don't know whether ghc has anything similar?

Regards,
Malcolm
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users



Re: Profiling question

2003-01-06 Thread John Meacham
Ah, I'd definatly like to request it for GHC. as well as a version in
the IO monad, I have wanted both on various occasions.
John

On Mon, Jan 06, 2003 at 12:55:35PM +, Malcolm Wallace wrote:
 Kirsten Chevalier [EMAIL PROTECTED] writes:
 
  I'd like to be able to determine the percentage of allocated objects of
  a particular type at specific points in a program's execution. I know
  that I can use heap profiling to create a graph of memory usage broken
  down by type, but is there any way to record this information at
  particular points in the program (i.e., between two statements in a
  do-expression)?
 
 If you were using nhc98, then you could use the following:
 
 import NonStdProfile
 
 f ... = do ...
profile point A actionA
profile point B actionB
 
 The non-standard operation
 profile :: String - a - a
 places a labelled marker line on the profile graph at the time instant
 when the value is demanded.
 
 I don't know whether ghc has anything similar?
 
 Regards,
 Malcolm
 ___
 Glasgow-haskell-users mailing list
 [EMAIL PROTECTED]
 http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
 

-- 
---
John Meacham - California Institute of Technology, Alum. - [EMAIL PROTECTED]
---
___
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users