[GHC] #8646: Distinguish between update frames in rts/Printer.c

#8646: Distinguish between update frames in rts/Printer.c ------------------------------------+------------------------------------- Reporter: Tarrasch | Owner: simonmar Type: feature request | Status: new Priority: lowest | Milestone: _|_ Component: Runtime System | Version: 7.6.3 Keywords: | Operating System: Unknown/Multiple Architecture: Unknown/Multiple | Type of failure: None/Unknown Difficulty: Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | ------------------------------------+------------------------------------- When doing printf-debugging and using Printer.c, it would be nice to see exact kind of update frame. (See attached patch) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8646 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8646: Distinguish between update frames in rts/Printer.c -------------------------------------+------------------------------------ Reporter: Tarrasch | Owner: simonmar Type: feature request | Status: patch Priority: lowest | Milestone: _|_ Component: Runtime System | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Changes (by Tarrasch): * status: new => patch -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8646#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8646: Distinguish between update frames in rts/Printer.c -------------------------------------+------------------------------------ Reporter: Tarrasch | Owner: simonmar Type: feature request | Status: patch Priority: lowest | Milestone: _|_ Component: Runtime System | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by ezyang): It might be more robust if, in the failure check, it re-checked the closure type, and reported "unknown update frame" or "not an update frame" instead. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8646#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8646: Distinguish between update frames in rts/Printer.c -------------------------------------+------------------------------------ Reporter: Tarrasch | Owner: simonmar Type: feature request | Status: patch Priority: lowest | Milestone: _|_ Component: Runtime System | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by Tarrasch): Thanks for the quick reply, but I'm not sure I understood your suggestions: 1. By re-check, do you mean to check that `info->type == UPDATE_FRAME`? 2. By report, do you mean to use `barf()`? Won't it be enough to just do (2.)? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8646#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8646: Distinguish between update frames in rts/Printer.c -------------------------------------+------------------------------------ Reporter: Tarrasch | Owner: simonmar Type: feature request | Status: patch Priority: lowest | Milestone: _|_ Component: Runtime System | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by ezyang): Your function has an invariant, "must be an UPDATE_FRAME". So logically, it should check if that invariant is violated. I think your check in (1) is the right one but I haven't double-checked. If an invariant is violated, barfing seems to be the right thing to do. Honestly, I would also barf when you expected an update frame but didn't get one. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8646#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8646: Distinguish between update frames in rts/Printer.c -------------------------------------+------------------------------------ Reporter: Tarrasch | Owner: simonmar Type: feature request | Status: patch Priority: lowest | Milestone: _|_ Component: Runtime System | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by Tarrasch): I added a slightly changed patch. Now it barfs rather than returning a descriptive string-value. I think doing something as in (1) is redundant, since I exhaustively check against all types of update_frames in the `if`-statements. If it goes to the last else-branch, it's not an update frame. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8646#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8646: Distinguish between update frames in rts/Printer.c -------------------------------------+------------------------------------ Reporter: Tarrasch | Owner: simonmar Type: feature request | Status: patch Priority: lowest | Milestone: _|_ Component: Runtime System | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Comment (by Tarrasch): Hi again, anything I can do to help this getting merged? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8646#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8646: Distinguish between update frames in rts/Printer.c -------------------------------------+------------------------------------ Reporter: Tarrasch | Owner: thoughtpolice Type: feature request | Status: patch Priority: lowest | Milestone: _|_ Component: Runtime System | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Changes (by simonmar): * owner: simonmar => thoughtpolice Comment: Ok, approved. I think I'll change the output slightly once it's in, but we can push it in for now. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8646#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8646: Distinguish between update frames in rts/Printer.c -------------------------------------+------------------------------------ Reporter: Tarrasch | Owner: Type: feature request | Status: new Priority: lowest | Milestone: _|_ Component: Runtime System | Version: 7.6.3 Resolution: | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Changes (by simonmar): * owner: thoughtpolice => * status: patch => new -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8646#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8646: Distinguish between update frames in rts/Printer.c -------------------------------------+------------------------------------ Reporter: Tarrasch | Owner: Type: feature request | Status: closed Priority: lowest | Milestone: _|_ Component: Runtime System | Version: 7.6.3 Resolution: fixed | Keywords: Operating System: Unknown/Multiple | Architecture: Unknown/Multiple Type of failure: None/Unknown | Difficulty: Unknown Test Case: | Blocked By: Blocking: | Related Tickets: -------------------------------------+------------------------------------ Changes (by thoughtpolice): * status: new => closed * resolution: => fixed Comment: Merged in [d1712dbd2b4c5d23a60d8a369e17045a397bf4f5/ghc]. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8646#comment:9 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#8646: Distinguish between update frames in rts/Printer.c -------------------------------------+------------------------------------- Reporter: Tarrasch | Owner: Type: feature | Status: closed request | Milestone: 7.8.1 Priority: lowest | Version: 7.6.3 Component: Runtime | Keywords: System | Architecture: Unknown/Multiple Resolution: fixed | Difficulty: Unknown Operating System: | Blocked By: Unknown/Multiple | Related Tickets: Type of failure: | None/Unknown | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by hvr): * milestone: ⊥ => 7.8.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/8646#comment:10 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC