Ticket #3024 (new task)

Opened 4 years ago

Last modified 7 months ago

Rewrite hp2ps in Haskell

Reported by: SamB Owned by:
Priority: normal Milestone: _|_
Component: Profiling Version: 6.10.1
Keywords: Cc: SamB, anton.nik@…, claudiusmaximus@…
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Difficulty: Unknown
Test Case: Blocked By:
Blocking: #5641, #7291 Related Tickets:

Description (last modified by simonmar) (diff)

Right now, hp2ps is written in rather difficult to modify C, and is quite inflexible. We should rewrite it in Haskell and make it, among other things, more tolerant to incomplete records.

Change History

Changed 4 years ago by SamB

  • cc naesten@… added

This would also help with #3021.

Changed 4 years ago by SamB

  • cc SamB added; naesten@… removed

Changed 4 years ago by simonmar

  • difficulty set to Unknown
  • description modified (diff)

Changed 4 years ago by igloo

It would also be useful to be able to print some of the results as text, e.g. for a biographical profile it might print:

VOID: 23%
DRAG: 16%
...

where the percentages are the area of the graph.

This would allow us to write better tests for heap profiling.

Changed 4 years ago by igloo

  • milestone set to 6.12 branch

Changed 4 years ago by igloo

  • failure set to None/Unknown
  • milestone changed from 6.12 branch to _|_

Changed 3 years ago by lelf

  • cc anton.nik@… added

Changed 3 years ago by ClaudiusMaximus

  • cc claudiusmaximus@… added

Changed 8 months ago by nomeata

I opened a separate ticket for the incomplete profile issue; if you fix the bug here you have probabaly fixed #7291 along with it.

Changed 7 months ago by igloo

  • blocking 5641, 7291 added

Changed 7 months ago by igloo

In #5641, simonmar says

hp2ps needs to be thrown away and rewritten in Haskell. Last I heard hp2pretty
wasn't quite there yet.

In #7291, diatchki says

An alternative to hpt2ps is hp2html (http://hackage.haskell.org/package/hp2html).
I wrote it when I had to do a bunch of profiling at work. It is written in Haskell,
and it supports partial data, so you can refresh your profile while it is being
generated. Perhaps we should distribute that instead of hp2ps?

The .hp format has been stable for a long time, so I'm not sure we need to ship a .hp tool with GHC at all: If one is put into the Haskell Platform then (after a year or two) we can just stop shipping hp2ps, as everyone will have the Haskell Platform tool anyway.

That way, the tool can freely use e.g. an SVG library, without adding another dependency to the GHC build.

Note: See TracTickets for help on using tickets.