Lines Matching defs:stat

159 	struct test_stat *stat = (struct test_stat *)data;
166 if (t < stat->min)
167 stat->min = t;
169 if (t > stat->max)
170 stat->max = t;
172 stat->real_cnt++;
173 stat->sum += t;
180 struct test_stat stat;
182 memset(&stat, 0, sizeof(stat));
183 stat.min = INT_MAX;
184 kallsyms_on_each_symbol(lookup_name, &stat);
185 pr_info("kallsyms_lookup_name() looked up %d symbols\n", stat.real_cnt);
187 stat.min, stat.max, div_u64(stat.sum, stat.real_cnt));
192 struct test_stat *stat = (struct test_stat *)data;
194 if (!strcmp(name, stat->name)) {
195 stat->real_cnt++;
196 stat->addr = addr;
198 if (stat->save_cnt < MAX_NUM_OF_RECORDS) {
199 stat->addrs[stat->save_cnt] = addr;
200 stat->save_cnt++;
203 if (stat->real_cnt == stat->max)
213 struct test_stat stat;
215 memset(&stat, 0, sizeof(stat));
216 stat.max = INT_MAX;
217 stat.name = stub_name;
218 stat.perf = 1;
220 kallsyms_on_each_symbol(find_symbol, &stat);
227 struct test_stat *stat = (struct test_stat *)data;
229 stat->real_cnt++;
230 stat->addr = addr;
232 if (stat->save_cnt < MAX_NUM_OF_RECORDS) {
233 stat->addrs[stat->save_cnt] = addr;
234 stat->save_cnt++;
237 if (stat->real_cnt == stat->max)
246 struct test_stat stat;
248 memset(&stat, 0, sizeof(stat));
249 stat.max = INT_MAX;
250 stat.name = stub_name;
252 kallsyms_on_each_match_symbol(match_symbol, stat.name, &stat);
265 struct test_stat *stat, *stat2;
267 stat = kmalloc(sizeof(*stat) * 2, GFP_KERNEL);
268 if (!stat)
270 stat2 = stat + 1;
284 memset(stat, 0, sizeof(*stat));
285 stat->max = INT_MAX;
286 stat->name = test_items[i].name;
287 kallsyms_on_each_symbol(find_symbol, stat);
288 if (stat->addr != test_items[i].addr || stat->real_cnt != 1) {
292 stat->real_cnt, stat->addr, test_items[i].addr);
298 memset(stat, 0, sizeof(*stat));
299 stat->max = INT_MAX;
300 stat->name = test_items[i].name;
301 kallsyms_on_each_match_symbol(match_symbol, test_items[i].name, stat);
302 if (stat->addr != test_items[i].addr || stat->real_cnt != 1) {
306 stat->real_cnt, stat->addr, test_items[i].addr);
311 kfree(stat);
329 memset(stat, 0, sizeof(*stat));
330 stat->max = INT_MAX;
331 kallsyms_on_each_match_symbol(match_symbol, namebuf, stat);
347 if (stat->addr != stat2->addr ||
348 stat->real_cnt != stat2->real_cnt ||
349 memcmp(stat->addrs, stat2->addrs,
350 stat->save_cnt * sizeof(stat->addrs[0]))) {
365 if (!stat->real_cnt) {
378 if (lookup_addr != stat->addrs[0]) {
379 pr_info("%s: lookup_addr != stat->addrs[0]\n", namebuf);
387 if (stat->real_cnt <= MAX_NUM_OF_RECORDS) {
388 for (j = 0; j < stat->save_cnt; j++) {
389 if (stat->addrs[j] == addr)
393 if (j == stat->save_cnt) {
400 kfree(stat);
406 kfree(stat);