Opened 17 months ago

Closed 3 months ago

#8811 closed bug (fixed)

Profiling output jumbled together

Reported by: augustss Owned by: dalaing
Priority: normal Milestone: 7.12.1
Component: Profiling Version: 7.6.3
Keywords: newcomer Cc:
Operating System: Unknown/Multiple Architecture: Unknown/Multiple
Type of failure: None/Unknown Test Case: prof.sample files in profiling/should_run
Blocked By: Blocking:
Related Tickets: Differential Revisions: Phab:D779

Description

In the time profile (-p), if the MODULE column is very wide and the no. column is also very wide they will run together with no space between.

Change History (10)

comment:1 Changed 8 months ago by thomie

  • Component changed from Compiler to Profiling

For reference: the change needs to be made in rts/Profiling.c.

fprintf(prof_file, "%6s %11s  %5s %5s   %5s %5s", "no.", "entries", "%time", "%alloc", "%time", "%alloc");

comment:2 Changed 8 months ago by jstolarek

  • Keywords newcomer added

comment:3 Changed 3 months ago by dalaing

  • Owner set to dalaing

comment:4 Changed 3 months ago by dalaing

Any thoughts on whether I should

  • just add the missing space in
  • work out the maximum width of the "no." column and pad things out to suit?

Both are pretty doable, although I've got the first one more or less ready to go.

comment:5 Changed 3 months ago by thomie

  • If you calculate the maximum width of the "no." column, then writing a test will be easier. Otherwise you'd need a test with over >104 or 105 cost centres, which might need to run for a long time? Just do what you think is reasonable, maybe no extra test is needed.
  • To be sure: the line I referenced above is only for the header. The function logCCS needs to be updated as well.
  • I think all the .prof.sample files in the output will need to be updated afterwards. You might want to make sure they are up-to-date before making any changes. See Building/RunningTests/Updating.

comment:6 Changed 3 months ago by dalaing

  • Differential Revisions set to Phab:D779

comment:7 Changed 3 months ago by dalaing

I've updated a few things, including logCCS. Some of the constants in the file / formatting string seemed to be out by 1.

I'm not sure a new test is needed, although I definitely need to update the .prof.sample files.

comment:8 Changed 3 months ago by dalaing

  • Status changed from new to patch

comment:9 Changed 3 months ago by Thomas Miedema <thomasmiedema@…>

In c81e07063dd4f792d65f5933cfb906620d120b24/ghc:

Stop profiling output from running together (#8811)

Reviewed By: thomie

Differential Revision: https://phabricator.haskell.org/D779

comment:10 Changed 3 months ago by thomie

  • Milestone set to 7.12.1
  • Resolution set to fixed
  • Status changed from patch to closed
  • Test Case set to prof.sample files in profiling/should_run

Thanks Dave.

I opened for #10247 for the 5x increase in memory allocation since 2011 of several profiling tests (seen in this patch, but unrelated to this ticket).

Note: See TracTickets for help on using tickets.