Lines Matching refs:line
91 static bool parse_smaps_field(const char* line, MemUsage* stats) { in parse_smaps_field() argument
92 const char *end = line; in parse_smaps_field()
96 if (*end && end > line && *(end - 1) == ':') { in parse_smaps_field()
99 switch (line[0]) { in parse_smaps_field()
101 if (strncmp(line, "Pss:", 4) == 0) { in parse_smaps_field()
103 } else if (strncmp(line, "Private_Clean:", 14) == 0) { in parse_smaps_field()
107 } else if (strncmp(line, "Private_Dirty:", 14) == 0) { in parse_smaps_field()
111 } else if (strncmp(line, "Private_Hugetlb:", 16) == 0) { in parse_smaps_field()
116 if (strncmp(line, "Size:", 5) == 0) { in parse_smaps_field()
118 } else if (strncmp(line, "Shared_Clean:", 13) == 0) { in parse_smaps_field()
120 } else if (strncmp(line, "Shared_Dirty:", 13) == 0) { in parse_smaps_field()
122 } else if (strncmp(line, "Swap:", 5) == 0) { in parse_smaps_field()
124 } else if (strncmp(line, "SwapPss:", 8) == 0) { in parse_smaps_field()
126 } else if (strncmp(line, "ShmemPmdMapped:", 15) == 0) { in parse_smaps_field()
128 } else if (strncmp(line, "Shared_Hugetlb:", 15) == 0) { in parse_smaps_field()
133 if (strncmp(line, "Rss:", 4) == 0) { in parse_smaps_field()
138 if (strncmp(line, "AnonHugePages:", 14) == 0) { in parse_smaps_field()
143 if (strncmp(line, "FilePmdMapped:", 14) == 0) { in parse_smaps_field()
148 if (strncmp(line, "Locked:", 7) == 0) { in parse_smaps_field()
591 char* line = nullptr; in ForEachVmaFromFile() local
596 while ((line_len = getline(&line, &line_alloc, fp.get())) > 0) { in ForEachVmaFromFile()
598 line[line_len] = '\0'; in ForEachVmaFromFile()
601 if (parse_smaps_field(line, &vma.usage)) { in ForEachVmaFromFile()
608 free(line); in ForEachVmaFromFile()
618 line, [&](const android::procinfo::MapInfo& mapinfo) { in ForEachVmaFromFile()
628 free(line); in ForEachVmaFromFile()
637 free(line); in ForEachVmaFromFile()
644 free(line); in ForEachVmaFromFile()
685 char* line = nullptr; in SmapsOrRollupFromFile() local
688 while (getline(&line, &line_alloc, fp.get()) > 0) { in SmapsOrRollupFromFile()
689 switch (line[0]) { in SmapsOrRollupFromFile()
691 if (strncmp(line, "Pss:", 4) == 0) { in SmapsOrRollupFromFile()
692 char* c = line + 4; in SmapsOrRollupFromFile()
694 } else if (strncmp(line, "Private_Clean:", 14) == 0) { in SmapsOrRollupFromFile()
695 char* c = line + 14; in SmapsOrRollupFromFile()
699 } else if (strncmp(line, "Private_Dirty:", 14) == 0) { in SmapsOrRollupFromFile()
700 char* c = line + 14; in SmapsOrRollupFromFile()
707 if (strncmp(line, "Rss:", 4) == 0) { in SmapsOrRollupFromFile()
708 char* c = line + 4; in SmapsOrRollupFromFile()
713 if (strncmp(line, "SwapPss:", 8) == 0) { in SmapsOrRollupFromFile()
714 char* c = line + 8; in SmapsOrRollupFromFile()
722 free(line); in SmapsOrRollupFromFile()
732 char* line = nullptr; in SmapsOrRollupPssFromFile() local
734 while (getline(&line, &line_alloc, fp.get()) > 0) { in SmapsOrRollupPssFromFile()
736 if (sscanf(line, "Pss: %" SCNu64 " kB", &v) == 1) { in SmapsOrRollupPssFromFile()
742 free(line); in SmapsOrRollupPssFromFile()
757 char* line = nullptr; in StatusVmRSSFromFile() local
759 while (getline(&line, &line_alloc, fp.get()) > 0) { in StatusVmRSSFromFile()
761 if (sscanf(line, "VmRSS: %" SCNu64 " kB", &v) == 1) { in StatusVmRSSFromFile()
770 free(line); in StatusVmRSSFromFile()