kern_fork.c (5e3f7694b189584ae30219566fcc6c4c3d059305) | kern_fork.c (222d01951f8677015e3e96c6950e809c0d983c09) |
---|---|
1/*- 2 * Copyright (c) 1982, 1986, 1989, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 651 unchanged lines hidden (view full) --- 660 661 /* 662 * Finish creating the child process. It will return via a different 663 * execution path later. (ie: directly into user mode) 664 */ 665 vm_forkproc(td, p2, td2, flags); 666 667 if (flags == (RFFDG | RFPROC)) { | 1/*- 2 * Copyright (c) 1982, 1986, 1989, 1991, 1993 3 * The Regents of the University of California. All rights reserved. 4 * (c) UNIX System Laboratories, Inc. 5 * All or some portions of this file are derived from material licensed 6 * to the University of California by American Telephone and Telegraph 7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with 8 * the permission of UNIX System Laboratories, Inc. --- 651 unchanged lines hidden (view full) --- 660 661 /* 662 * Finish creating the child process. It will return via a different 663 * execution path later. (ie: directly into user mode) 664 */ 665 vm_forkproc(td, p2, td2, flags); 666 667 if (flags == (RFFDG | RFPROC)) { |
668 atomic_add_int(&cnt.v_forks, 1); 669 atomic_add_int(&cnt.v_forkpages, p2->p_vmspace->vm_dsize + | 668 VMCNT_ADD(forks, 1); 669 VMCNT_ADD(forkpages, p2->p_vmspace->vm_dsize + |
670 p2->p_vmspace->vm_ssize); 671 } else if (flags == (RFFDG | RFPROC | RFPPWAIT | RFMEM)) { | 670 p2->p_vmspace->vm_ssize); 671 } else if (flags == (RFFDG | RFPROC | RFPPWAIT | RFMEM)) { |
672 atomic_add_int(&cnt.v_vforks, 1); 673 atomic_add_int(&cnt.v_vforkpages, p2->p_vmspace->vm_dsize + | 672 VMCNT_ADD(forks, 1); 673 VMCNT_ADD(forkpages, p2->p_vmspace->vm_dsize + |
674 p2->p_vmspace->vm_ssize); 675 } else if (p1 == &proc0) { | 674 p2->p_vmspace->vm_ssize); 675 } else if (p1 == &proc0) { |
676 atomic_add_int(&cnt.v_kthreads, 1); 677 atomic_add_int(&cnt.v_kthreadpages, p2->p_vmspace->vm_dsize + | 676 VMCNT_ADD(kthreads, 1); 677 VMCNT_ADD(kthreadpages, p2->p_vmspace->vm_dsize + |
678 p2->p_vmspace->vm_ssize); 679 } else { | 678 p2->p_vmspace->vm_ssize); 679 } else { |
680 atomic_add_int(&cnt.v_rforks, 1); 681 atomic_add_int(&cnt.v_rforkpages, p2->p_vmspace->vm_dsize + | 680 VMCNT_ADD(rforks, 1); 681 VMCNT_ADD(rforkpages, p2->p_vmspace->vm_dsize + |
682 p2->p_vmspace->vm_ssize); 683 } 684 685 /* 686 * Both processes are set up, now check if any loadable modules want 687 * to adjust anything. 688 * What if they have an error? XXX 689 */ --- 159 unchanged lines hidden --- | 682 p2->p_vmspace->vm_ssize); 683 } 684 685 /* 686 * Both processes are set up, now check if any loadable modules want 687 * to adjust anything. 688 * What if they have an error? XXX 689 */ --- 159 unchanged lines hidden --- |