Lines Matching refs:tcm
74 struct tcms *tcm;
183 if( (tcm = (struct tcms *)calloc(CSIZE, sizeof(struct tcms))) == NULL) {
192 qsort(tcm, csize, sizeof(tcm[0]),
455 for (i %= csize, j = 0; tcm[i].tcm_comm[0] && j != csize; i = (i+1)%csize, j++)
456 if (EQN(p->tcm_comm, tcm[i].tcm_comm))
459 if ((ntcm = (struct tcms *) realloc(tcm,
462 "acctcms: Cannot reallocate memory (tcm)\n");
466 tcm = ntcm;
467 if (!EQN(p->tcm_comm, tcm[i].tcm_comm))
472 if (tcm[i].tcm_comm[0] == 0)
473 CPYN(tcm[i].tcm_comm, p->tcm_comm);
474 tcmadd(&tcm[i], p);
520 if (i != j && tcm[i].tcm_comm[0] && tcm[i].tcm_pc <= 1) {
521 tcmadd(&tcm[j], &tcm[i]);
522 tcm[i].tcm_comm[0] = 0;
572 if (tcm[i].tcm_comm[0]) {
573 CPYN(tcm[k].tcm_comm, tcm[i].tcm_comm);
574 tcm[k].tcm_pc = tcm[i].tcm_pc;
575 tcm[k].tcm_cpu = tcm[i].tcm_cpu;
576 tcm[k].tcm_real = tcm[i].tcm_real;
577 tcm[k].tcm_kcore = tcm[i].tcm_kcore;
578 tcm[k].tcm_io = tcm[i].tcm_io;
579 tcm[k].tcm_rw = tcm[i].tcm_rw;
696 tcmadd(&tcmtmp, &tcm[i]);
701 tprint(&tcm[i]);
729 fwrite(&tcm[i], sizeof(tcm[i]), 1, stdout);