Commit 45ac496
perf machine: Move fprintf to for_each loop and a callback
Avoid exposing the threads data structure by switching to the callback
machine__for_each_thread approach. machine__fprintf is only used in
tests and verbose >3 output so don't turn to list and sort. Add
machine__threads_nr to be refactored later.
Note, all existing *_fprintf routines ignore fprintf errors.
Signed-off-by: Ian Rogers <irogers@google.com>
Acked-by: Namhyung Kim <namhyung@kernel.org>
Cc: Yang Jihong <yangjihong1@huawei.com>
Cc: Oliver Upton <oliver.upton@linux.dev>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Link: https://lore.kernel.org/r/20240301053646.1449657-4-irogers@google.com1 parent f178ffd commit 45ac496
1 file changed
Lines changed: 27 additions & 16 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1113 | 1113 | | |
1114 | 1114 | | |
1115 | 1115 | | |
1116 | | - | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
1117 | 1122 | | |
1118 | | - | |
1119 | | - | |
1120 | | - | |
| 1123 | + | |
1121 | 1124 | | |
1122 | | - | |
1123 | | - | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
| 1128 | + | |
1124 | 1129 | | |
1125 | | - | |
| 1130 | + | |
| 1131 | + | |
| 1132 | + | |
1126 | 1133 | | |
1127 | | - | |
| 1134 | + | |
| 1135 | + | |
1128 | 1136 | | |
1129 | | - | |
1130 | | - | |
1131 | | - | |
| 1137 | + | |
| 1138 | + | |
1132 | 1139 | | |
1133 | | - | |
1134 | | - | |
| 1140 | + | |
| 1141 | + | |
| 1142 | + | |
| 1143 | + | |
| 1144 | + | |
| 1145 | + | |
| 1146 | + | |
1135 | 1147 | | |
1136 | | - | |
1137 | | - | |
1138 | | - | |
| 1148 | + | |
| 1149 | + | |
1139 | 1150 | | |
1140 | 1151 | | |
1141 | 1152 | | |
| |||
0 commit comments