[GHC] #9261: -S prints incorrect number of bound tasks

GHC ghc-devs at haskell.org
Fri Nov 14 18:00:45 UTC 2014


#9261: -S prints incorrect number of bound tasks
-------------------------------------+-------------------------------------
              Reporter:  edsko       |            Owner:  simonmar
                  Type:  bug         |           Status:  new
              Priority:  low         |        Milestone:
             Component:  Runtime     |          Version:  7.8.2
  System                             |         Keywords:  newcomer
            Resolution:              |     Architecture:  Unknown/Multiple
      Operating System:              |       Difficulty:  Easy (less than 1
  Unknown/Multiple                   |  hour)
       Type of failure:              |       Blocked By:
  None/Unknown                       |  Related Tickets:
             Test Case:              |
              Blocking:              |
Differential Revisions:              |
-------------------------------------+-------------------------------------
Changes (by thomie):

 * cc: simonmar (added)
 * component:  Compiler => Runtime System
 * difficulty:  Unknown => Easy (less than 1 hour)
 * keywords:   => newcomer
 * owner:   => simonmar


Old description:

> In `Stats.c` we have:
>
> {{{
>             statsPrintf("  TASKS: %d (%d bound, %d peak workers (%d
> total), using -N%d)\n",
>                         taskCount, taskCount - workerCount,
>                         peakWorkerCount, workerCount,
>                         n_capabilities);
> }}}
>
> but I think `taskCount - workerCount` must be wrong, because `taskCount`
> is the _current_ number of tasks, while `workerAcount` is the _total_
> number of workers (accumulating). I think it should be:
>
> {{{
>             statsPrintf("  TASKS: %d (%d bound, %d peak workers (%d
> total), using -N%d)\n",
>                         taskCount, taskCount - currentWorkerCount,
>                         peakWorkerCount, workerCount,
>                         n_capabilities);
> }}}

New description:

 In `rts/Stats.c` we have:

 {{{
             statsPrintf("  TASKS: %d (%d bound, %d peak workers (%d
 total), using -N%d)\n",
                         taskCount, taskCount - workerCount,
                         peakWorkerCount, workerCount,
                         n_capabilities);
 }}}

 but I think `taskCount - workerCount` must be wrong, because `taskCount`
 is the _current_ number of tasks, while `workerAcount` is the _total_
 number of workers (accumulating). I think it should be:

 {{{
             statsPrintf("  TASKS: %d (%d bound, %d peak workers (%d
 total), using -N%d)\n",
                         taskCount, taskCount - currentWorkerCount,
                         peakWorkerCount, workerCount,
                         n_capabilities);
 }}}

--

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9261#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list