code:profil - ikarishinjieva/unixV6-code-analyze-chs GitHub Wiki
3666
3667 profil()
3668 {
3669
3670 u.u_prof[0] = u.u_arg[0] & ~1; /* base of sample buf */
3671 u.u_prof[1] = u.u_arg[1]; /* size of same */
- 设置 统计数组的起始地址
- 地址 修剪为 偶地址
3672 u.u_prof[2] = u.u_arg[2]; /* pc offset */
3673 u.u_prof[3] = (u.u_arg[3]>>1) & 077777; /* pc scale */
3674 }
- 设置 缩放比例(并非实际缩放比例),为 传入参数/2
3675 /* ------------------------- */
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
- (profil = 44.; not in assembler)
- sys profil; buff; bufsiz; offset; scale