Home | History | Annotate | Download | only in blktrace

Lines Matching defs:ppi

73  * some duplicated effort here, we can unify this hash and the ppi hash later
643 static inline int ppi_hash(struct per_process_info *ppi)
645 struct process_pid_map *ppm = ppi->ppm;
653 static inline void add_ppi_to_hash(struct per_process_info *ppi)
655 const int hash_idx = ppi_hash(ppi);
657 ppi->hash_next = ppi_hash_table[hash_idx];
658 ppi_hash_table[hash_idx] = ppi;
661 static inline void add_ppi_to_list(struct per_process_info *ppi)
663 ppi->list_next = ppi_list;
664 ppi_list = ppi;
671 struct per_process_info *ppi;
673 ppi = ppi_hash_table[hash_idx];
674 while (ppi) {
675 struct process_pid_map *ppm = ppi->ppm;
678 return ppi;
680 ppi = ppi->hash_next;
689 struct per_process_info *ppi;
691 ppi = ppi_hash_table[hash_idx];
692 while (ppi) {
693 struct process_pid_map *ppm = ppi->ppm;
696 return ppi;
698 ppi = ppi->hash_next;
706 struct per_process_info *ppi;
716 ppi = find_ppi_by_name(name);
717 if (ppi && ppi->ppm->pid != pid)
718 ppi->more_than_one = 1;
720 return ppi;
1053 struct per_process_info *ppi = find_ppi(iot->ppm->pid);
1056 if (ppi && elapsed > ppi->longest_allocation_wait[w])
1057 ppi->longest_allocation_wait[w] = elapsed;
1090 struct per_process_info *ppi = find_ppi(iot->ppm->pid);
1093 if (ppi && elapsed > ppi->longest_dispatch_wait[w])
1094 ppi->longest_dispatch_wait[w] = elapsed;
1125 struct per_process_info *ppi = find_ppi(iot->ppm->pid);
1128 if (ppi && elapsed > ppi->longest_completion_wait[w])
1129 ppi->longest_completion_wait[w] = elapsed;
1144 struct per_process_info *ppi = find_ppi(pid);
1146 if (!ppi) {
1147 ppi = malloc(sizeof(*ppi));
1148 memset(ppi, 0, sizeof(*ppi));
1149 ppi->ppm = find_ppm(pid);
1150 if (!ppi->ppm)
1151 ppi->ppm = add_ppm_hash(pid, "unknown");
1152 add_ppi_to_hash(ppi);
1153 add_ppi_to_list(ppi);
1156 return &ppi->io_stats;
1684 static void dump_wait_stats(struct per_process_info *ppi)
1686 unsigned long rawait = ppi->longest_allocation_wait[0] / 1000;
1687 unsigned long rdwait = ppi->longest_dispatch_wait[0] / 1000;
1688 unsigned long rcwait = ppi->longest_completion_wait[0] / 1000;
1689 unsigned long wawait = ppi->longest_allocation_wait[1] / 1000;
1690 unsigned long wdwait = ppi->longest_dispatch_wait[1] / 1000;
1691 unsigned long wcwait = ppi->longest_completion_wait[1] / 1000;
1717 struct per_process_info *ppi;
1722 ppi = ppi_list;
1723 while (ppi) {
1724 ppis[i++] = ppi;
1725 ppi = ppi->list_next;
1728 qsort(ppis, ppi_list_entries, sizeof(ppi), ppi_name_compare);
1733 ppi = ppis[i];
1735 ppi->list_next = ppi_list;
1736 ppi_list = ppi;
1745 struct per_process_info *ppi;
1749 ppi = ppi_list;
1750 while (ppi) {
1751 struct process_pid_map *ppm = ppi->ppm;
1754 if (ppi->more_than_one)
1759 dump_io_stats(NULL, &ppi->io_stats, name);
1760 dump_wait_stats(ppi);
1761 ppi = ppi->list_next;