| // Copyright 2022 The Go Authors. All rights reserved. | |
| // Use of this source code is governed by a BSD-style | |
| // license that can be found in the LICENSE file. | |
| #define NOSPLIT 7 | |
| #define NOFRAME 512 | |
| TEXT 路asmMain(SB),0,$0-0 | |
| CALL 路startSelf(SB) | |
| CALL 路startChain(SB) | |
| CALL 路startRec(SB) | |
| RET | |
| // Test reporting of basic over-the-limit | |
| TEXT 路startSelf(SB),NOSPLIT,$1000-0 | |
| RET | |
| // Test reporting of multiple over-the-limit chains | |
| TEXT 路startChain(SB),NOSPLIT,$16-0 | |
| CALL 路chain0(SB) | |
| CALL 路chain1(SB) | |
| CALL 路chain2(SB) | |
| RET | |
| TEXT 路chain0(SB),NOSPLIT,$32-0 | |
| CALL 路chainEnd(SB) | |
| RET | |
| TEXT 路chain1(SB),NOSPLIT,$48-0 // Doesn't go over | |
| RET | |
| TEXT 路chain2(SB),NOSPLIT,$64-0 | |
| CALL 路chainEnd(SB) | |
| RET | |
| TEXT 路chainEnd(SB),NOSPLIT,$1000-0 // Should be reported twice | |
| RET | |
| // Test reporting of rootless recursion | |
| TEXT 路startRec(SB),NOSPLIT|NOFRAME,$0-0 | |
| CALL 路startRec0(SB) | |
| RET | |
| TEXT 路startRec0(SB),NOSPLIT|NOFRAME,$0-0 | |
| CALL 路startRec(SB) | |
| RET | |