()
| 585 | } |
| 586 | |
| 587 | func cpuProfile() *profile.Profile { |
| 588 | var cpuM = []*profile.Mapping{ |
| 589 | { |
| 590 | ID: 1, |
| 591 | Start: 0x1000, |
| 592 | Limit: 0x4000, |
| 593 | File: "/path/to/testbinary", |
| 594 | HasFunctions: true, |
| 595 | HasFilenames: true, |
| 596 | HasLineNumbers: true, |
| 597 | HasInlineFrames: true, |
| 598 | }, |
| 599 | } |
| 600 | |
| 601 | var cpuF = []*profile.Function{ |
| 602 | {ID: 1, Name: "mangled1000", SystemName: "mangled1000", Filename: "testdata/file1000.src"}, |
| 603 | {ID: 2, Name: "mangled2000", SystemName: "mangled2000", Filename: "testdata/file2000.src"}, |
| 604 | {ID: 3, Name: "mangled2001", SystemName: "mangled2001", Filename: "testdata/file2000.src"}, |
| 605 | {ID: 4, Name: "mangled3000", SystemName: "mangled3000", Filename: "testdata/file3000.src"}, |
| 606 | {ID: 5, Name: "mangled3001", SystemName: "mangled3001", Filename: "testdata/file3000.src"}, |
| 607 | {ID: 6, Name: "mangled3002", SystemName: "mangled3002", Filename: "testdata/file3000.src"}, |
| 608 | } |
| 609 | |
| 610 | var cpuL = []*profile.Location{ |
| 611 | { |
| 612 | ID: 1000, |
| 613 | Mapping: cpuM[0], |
| 614 | Address: 0x1000, |
| 615 | Line: []profile.Line{ |
| 616 | {Function: cpuF[0], Line: 1}, |
| 617 | }, |
| 618 | }, |
| 619 | { |
| 620 | ID: 2000, |
| 621 | Mapping: cpuM[0], |
| 622 | Address: 0x2000, |
| 623 | Line: []profile.Line{ |
| 624 | {Function: cpuF[2], Line: 9}, |
| 625 | {Function: cpuF[1], Line: 4}, |
| 626 | }, |
| 627 | }, |
| 628 | { |
| 629 | ID: 3000, |
| 630 | Mapping: cpuM[0], |
| 631 | Address: 0x3000, |
| 632 | Line: []profile.Line{ |
| 633 | {Function: cpuF[5], Line: 2}, |
| 634 | {Function: cpuF[4], Line: 5}, |
| 635 | {Function: cpuF[3], Line: 6}, |
| 636 | }, |
| 637 | }, |
| 638 | { |
| 639 | ID: 3001, |
| 640 | Mapping: cpuM[0], |
| 641 | Address: 0x3001, |
| 642 | Line: []profile.Line{ |
| 643 | {Function: cpuF[4], Line: 8}, |
| 644 | {Function: cpuF[3], Line: 9}, |
no outgoing calls
no test coverage detected
searching dependent graphs…