Lines Matching refs:pu
746 exacct_attach_proc_item(proc_usage_t *pu, ea_object_t *record, int res) in exacct_attach_proc_item() argument
752 (void) ea_attach_item(record, &pu->pu_pid, in exacct_attach_proc_item()
756 (void) ea_attach_item(record, &pu->pu_ruid, in exacct_attach_proc_item()
760 (void) ea_attach_item(record, &pu->pu_acflag, in exacct_attach_proc_item()
764 (void) ea_attach_item(record, &pu->pu_rgid, in exacct_attach_proc_item()
768 (void) ea_attach_item(record, &pu->pu_projid, in exacct_attach_proc_item()
772 (void) ea_attach_item(record, &pu->pu_taskid, in exacct_attach_proc_item()
776 (void) ea_attach_item(record, &pu->pu_utimesec, in exacct_attach_proc_item()
778 (void) ea_attach_item(record, &pu->pu_utimensec, in exacct_attach_proc_item()
780 (void) ea_attach_item(record, &pu->pu_stimesec, in exacct_attach_proc_item()
782 (void) ea_attach_item(record, &pu->pu_stimensec, in exacct_attach_proc_item()
786 (void) ea_attach_item(record, &pu->pu_startsec, in exacct_attach_proc_item()
788 (void) ea_attach_item(record, &pu->pu_startnsec, in exacct_attach_proc_item()
790 (void) ea_attach_item(record, &pu->pu_finishsec, in exacct_attach_proc_item()
792 (void) ea_attach_item(record, &pu->pu_finishnsec, in exacct_attach_proc_item()
796 (void) ea_attach_item(record, pu->pu_command, in exacct_attach_proc_item()
797 strlen(pu->pu_command) + 1, EXT_STRING | EXD_PROC_COMMAND); in exacct_attach_proc_item()
800 (void) ea_attach_item(record, pu->pu_nodename, in exacct_attach_proc_item()
801 strlen(pu->pu_nodename) + 1, in exacct_attach_proc_item()
805 (void) ea_attach_item(record, &pu->pu_major, in exacct_attach_proc_item()
807 (void) ea_attach_item(record, &pu->pu_minor, in exacct_attach_proc_item()
811 (void) ea_attach_item(record, &pu->pu_majflt, in exacct_attach_proc_item()
813 (void) ea_attach_item(record, &pu->pu_minflt, in exacct_attach_proc_item()
815 (void) ea_attach_item(record, &pu->pu_sndmsg, in exacct_attach_proc_item()
817 (void) ea_attach_item(record, &pu->pu_rcvmsg, in exacct_attach_proc_item()
819 (void) ea_attach_item(record, &pu->pu_iblk, in exacct_attach_proc_item()
821 (void) ea_attach_item(record, &pu->pu_oblk, in exacct_attach_proc_item()
823 (void) ea_attach_item(record, &pu->pu_ioch, in exacct_attach_proc_item()
825 (void) ea_attach_item(record, &pu->pu_vcsw, in exacct_attach_proc_item()
827 (void) ea_attach_item(record, &pu->pu_icsw, in exacct_attach_proc_item()
829 (void) ea_attach_item(record, &pu->pu_nsig, in exacct_attach_proc_item()
831 (void) ea_attach_item(record, &pu->pu_nswp, in exacct_attach_proc_item()
833 (void) ea_attach_item(record, &pu->pu_nscl, in exacct_attach_proc_item()
837 (void) ea_attach_item(record, &pu->pu_ancpid, in exacct_attach_proc_item()
841 (void) ea_attach_item(record, &pu->pu_wstat, in exacct_attach_proc_item()
845 (void) ea_attach_item(record, pu->pu_zonename, in exacct_attach_proc_item()
846 strlen(pu->pu_zonename) + 1, in exacct_attach_proc_item()
850 (void) ea_attach_item(record, &pu->pu_mem_rss_avg, in exacct_attach_proc_item()
852 (void) ea_attach_item(record, &pu->pu_mem_rss_max, in exacct_attach_proc_item()
862 exacct_assemble_proc_record(proc_usage_t *pu, ulong_t *mask, in exacct_assemble_proc_record() argument
874 count += exacct_attach_proc_item(pu, record, res); in exacct_assemble_proc_record()
887 exacct_calculate_proc_mstate(proc_t *p, proc_usage_t *pu) in exacct_calculate_proc_mstate() argument
896 pu->pu_minflt += t->t_lwp->lwp_ru.minflt; in exacct_calculate_proc_mstate()
897 pu->pu_majflt += t->t_lwp->lwp_ru.majflt; in exacct_calculate_proc_mstate()
898 pu->pu_sndmsg += t->t_lwp->lwp_ru.msgsnd; in exacct_calculate_proc_mstate()
899 pu->pu_rcvmsg += t->t_lwp->lwp_ru.msgrcv; in exacct_calculate_proc_mstate()
900 pu->pu_ioch += t->t_lwp->lwp_ru.ioch; in exacct_calculate_proc_mstate()
901 pu->pu_iblk += t->t_lwp->lwp_ru.inblock; in exacct_calculate_proc_mstate()
902 pu->pu_oblk += t->t_lwp->lwp_ru.oublock; in exacct_calculate_proc_mstate()
903 pu->pu_vcsw += t->t_lwp->lwp_ru.nvcsw; in exacct_calculate_proc_mstate()
904 pu->pu_icsw += t->t_lwp->lwp_ru.nivcsw; in exacct_calculate_proc_mstate()
905 pu->pu_nsig += t->t_lwp->lwp_ru.nsignals; in exacct_calculate_proc_mstate()
906 pu->pu_nswp += t->t_lwp->lwp_ru.nswap; in exacct_calculate_proc_mstate()
907 pu->pu_nscl += t->t_lwp->lwp_ru.sysc; in exacct_calculate_proc_mstate()
912 exacct_copy_proc_mstate(proc_t *p, proc_usage_t *pu) in exacct_copy_proc_mstate() argument
914 pu->pu_minflt = p->p_ru.minflt; in exacct_copy_proc_mstate()
915 pu->pu_majflt = p->p_ru.majflt; in exacct_copy_proc_mstate()
916 pu->pu_sndmsg = p->p_ru.msgsnd; in exacct_copy_proc_mstate()
917 pu->pu_rcvmsg = p->p_ru.msgrcv; in exacct_copy_proc_mstate()
918 pu->pu_ioch = p->p_ru.ioch; in exacct_copy_proc_mstate()
919 pu->pu_iblk = p->p_ru.inblock; in exacct_copy_proc_mstate()
920 pu->pu_oblk = p->p_ru.oublock; in exacct_copy_proc_mstate()
921 pu->pu_vcsw = p->p_ru.nvcsw; in exacct_copy_proc_mstate()
922 pu->pu_icsw = p->p_ru.nivcsw; in exacct_copy_proc_mstate()
923 pu->pu_nsig = p->p_ru.nsignals; in exacct_copy_proc_mstate()
924 pu->pu_nswp = p->p_ru.nswap; in exacct_copy_proc_mstate()
925 pu->pu_nscl = p->p_ru.sysc; in exacct_copy_proc_mstate()
929 exacct_calculate_proc_usage(proc_t *p, proc_usage_t *pu, ulong_t *mask, in exacct_calculate_proc_usage() argument
941 pu->pu_utimesec = (uint64_t)(ulong_t)ts.tv_sec; in exacct_calculate_proc_usage()
942 pu->pu_utimensec = (uint64_t)(ulong_t)ts.tv_nsec; in exacct_calculate_proc_usage()
944 pu->pu_stimesec = (uint64_t)(ulong_t)ts.tv_sec; in exacct_calculate_proc_usage()
945 pu->pu_stimensec = (uint64_t)(ulong_t)ts.tv_nsec; in exacct_calculate_proc_usage()
949 pu->pu_finishsec = (uint64_t)(ulong_t)ts.tv_sec; in exacct_calculate_proc_usage()
950 pu->pu_finishnsec = (uint64_t)(ulong_t)ts.tv_nsec; in exacct_calculate_proc_usage()
961 pu->pu_startsec = (uint64_t)(ulong_t)ts.tv_sec; in exacct_calculate_proc_usage()
962 pu->pu_startnsec = (uint64_t)(ulong_t)ts.tv_nsec; in exacct_calculate_proc_usage()
965 pu->pu_pid = p->p_pidp->pid_id; in exacct_calculate_proc_usage()
966 pu->pu_acflag = p->p_user.u_acflag; in exacct_calculate_proc_usage()
967 pu->pu_projid = p->p_task->tk_proj->kpj_id; in exacct_calculate_proc_usage()
968 pu->pu_taskid = p->p_task->tk_tkid; in exacct_calculate_proc_usage()
969 pu->pu_major = getmajor(p->p_sessp->s_dev); in exacct_calculate_proc_usage()
970 pu->pu_minor = getminor(p->p_sessp->s_dev); in exacct_calculate_proc_usage()
971 pu->pu_ancpid = p->p_ancpid; in exacct_calculate_proc_usage()
972 pu->pu_wstat = wstat; in exacct_calculate_proc_usage()
977 pu->pu_mem_rss_avg = (PTOU(p)->u_mem / (p->p_stime + p->p_utime + 1)) * in exacct_calculate_proc_usage()
979 pu->pu_mem_rss_max = PTOU(p)->u_mem_max * (PAGESIZE / 1024); in exacct_calculate_proc_usage()
982 pu->pu_ruid = crgetruid(p->p_cred); in exacct_calculate_proc_usage()
983 pu->pu_rgid = crgetrgid(p->p_cred); in exacct_calculate_proc_usage()
986 bcopy(p->p_user.u_comm, pu->pu_command, strlen(p->p_user.u_comm) + 1); in exacct_calculate_proc_usage()
987 bcopy(p->p_zone->zone_name, pu->pu_zonename, in exacct_calculate_proc_usage()
989 bcopy(p->p_zone->zone_nodename, pu->pu_nodename, in exacct_calculate_proc_usage()
998 exacct_calculate_proc_mstate(p, pu); in exacct_calculate_proc_usage()
1000 exacct_copy_proc_mstate(p, pu); in exacct_calculate_proc_usage()
1020 exacct_assemble_proc_usage(ac_info_t *ac_proc, proc_usage_t *pu, in exacct_assemble_proc_usage() argument
1050 proc_record = exacct_assemble_proc_record(pu, mask, record_type); in exacct_assemble_proc_usage()
1103 proc_usage_t *pu; in exacct_do_commit_proc() local
1119 pu = kmem_alloc(sizeof (proc_usage_t), KM_SLEEP); in exacct_do_commit_proc()
1120 pu->pu_command = kmem_alloc(size, KM_SLEEP); in exacct_do_commit_proc()
1122 exacct_calculate_proc_usage(p, pu, mask, EW_FINAL, wstat); in exacct_do_commit_proc()
1125 (void) exacct_assemble_proc_usage(ac_proc, pu, in exacct_do_commit_proc()
1128 kmem_free(pu->pu_command, strlen(pu->pu_command) + 1); in exacct_do_commit_proc()
1129 kmem_free(pu, sizeof (proc_usage_t)); in exacct_do_commit_proc()