2 * Copyright (c) 2014-2018, Intel Corporation
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are met:
7 * * Redistributions of source code must retain the above copyright notice,
8 * this list of conditions and the following disclaimer.
9 * * Redistributions in binary form must reproduce the above copyright notice,
10 * this list of conditions and the following disclaimer in the documentation
11 * and/or other materials provided with the distribution.
12 * * Neither the name of Intel Corporation nor the names of its contributors
13 * may be used to endorse or promote products derived from this software
14 * without specific prior written permission.
16 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
20 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 * POSSIBILITY OF SUCH DAMAGE.
36 /* A memory buffer. */
41 * event[0] is the test setup
42 * event[1] is the event after writing and reading event[0]
44 struct pev_event event[2];
46 /* The perf event configuration. */
47 struct pev_config config;
57 /* The test fixture initialization and finalization functions. */
58 struct ptunit_result (*init)(struct pev_fixture *);
59 struct ptunit_result (*fini)(struct pev_fixture *);
62 static struct ptunit_result pfix_init(struct pev_fixture *pfix)
64 memset(pfix->buffer, 0xcd, sizeof(pfix->buffer));
65 memset(&pfix->sample, 0xcd, sizeof(pfix->sample));
67 pev_event_init(&pfix->event[0]);
68 pev_event_init(&pfix->event[1]);
70 pev_config_init(&pfix->config);
75 static struct ptunit_result pfix_init_sample_time(struct pev_fixture *pfix)
77 ptu_test(pfix_init, pfix);
79 pfix->config.sample_type |= (uint64_t) PERF_SAMPLE_TIME;
80 pfix->config.time_zero = 0xa0b00000ull;
81 pfix->config.time_shift = 4;
82 pfix->config.time_mult = 3;
84 pfix->sample.time = 0xa0b00cdeull;
85 pfix->event[0].sample.time = &pfix->sample.time;
90 static struct ptunit_result pfix_init_sample_who(struct pev_fixture *pfix)
92 ptu_test(pfix_init, pfix);
94 pfix->config.sample_type |= (uint64_t) PERF_SAMPLE_TID;
95 pfix->config.sample_type |= (uint64_t) PERF_SAMPLE_CPU;
97 pfix->sample.pid = 0xa0;
98 pfix->sample.tid = 0xa1;
99 pfix->sample.cpu = 0xb;
101 pfix->event[0].sample.pid = &pfix->sample.pid;
102 pfix->event[0].sample.tid = &pfix->sample.tid;
103 pfix->event[0].sample.cpu = &pfix->sample.cpu;
108 static struct ptunit_result pfix_read_write(struct pev_fixture *pfix)
110 uint8_t *begin, *end;
113 begin = pfix->buffer;
114 end = begin + sizeof(pfix->buffer);
116 size[0] = pev_write(&pfix->event[0], begin, end, &pfix->config);
117 ptu_int_gt(size[0], 0);
119 size[1] = pev_read(&pfix->event[1], begin, end, &pfix->config);
120 ptu_int_gt(size[1], 0);
122 ptu_int_eq(size[1], size[0]);
127 static struct ptunit_result pfix_check_sample_time(struct pev_fixture *pfix)
129 const uint64_t *time[2];
133 time[0] = pfix->event[0].sample.time;
134 time[1] = pfix->event[1].sample.time;
139 ptu_uint_eq(*time[1], *time[0]);
141 errcode = pev_time_to_tsc(&tsc, *time[0], &pfix->config);
142 ptu_int_eq(errcode, 0);
143 ptu_uint_eq(pfix->event[1].sample.tsc, tsc);
148 static struct ptunit_result pfix_check_sample_tid(struct pev_fixture *pfix)
150 const uint32_t *pid[2], *tid[2];
152 pid[0] = pfix->event[0].sample.pid;
153 pid[1] = pfix->event[1].sample.pid;
154 tid[0] = pfix->event[0].sample.tid;
155 tid[1] = pfix->event[1].sample.tid;
162 ptu_uint_eq(*pid[1], *pid[0]);
163 ptu_uint_eq(*tid[1], *tid[0]);
168 static struct ptunit_result pfix_check_sample_cpu(struct pev_fixture *pfix)
170 const uint32_t *cpu[2];
172 cpu[0] = pfix->event[0].sample.cpu;
173 cpu[1] = pfix->event[1].sample.cpu;
178 ptu_uint_eq(*cpu[1], *cpu[0]);
183 static struct ptunit_result pfix_check_sample(struct pev_fixture *pfix)
185 if (pfix->config.sample_type & PERF_SAMPLE_TID)
186 ptu_test(pfix_check_sample_tid, pfix);
188 ptu_null(pfix->event[1].sample.pid);
189 ptu_null(pfix->event[1].sample.tid);
192 if (pfix->config.sample_type & PERF_SAMPLE_TIME)
193 ptu_test(pfix_check_sample_time, pfix);
195 ptu_null(pfix->event[1].sample.time);
197 if (pfix->config.sample_type & PERF_SAMPLE_CPU)
198 ptu_test(pfix_check_sample_cpu, pfix);
200 ptu_null(pfix->event[1].sample.cpu);
205 static struct ptunit_result time_to_tsc_null(void)
207 struct pev_config config;
211 errcode = pev_time_to_tsc(NULL, 0x0ull, &config);
212 ptu_int_eq(errcode, -pte_internal);
214 errcode = pev_time_to_tsc(&tsc, 0x0ull, NULL);
215 ptu_int_eq(errcode, -pte_internal);
220 static struct ptunit_result time_from_tsc_null(void)
222 struct pev_config config;
226 errcode = pev_time_from_tsc(NULL, 0x0ull, &config);
227 ptu_int_eq(errcode, -pte_internal);
229 errcode = pev_time_from_tsc(&time, 0x0ull, NULL);
230 ptu_int_eq(errcode, -pte_internal);
235 static struct ptunit_result time_to_tsc(void)
237 struct pev_config config;
241 pev_config_init(&config);
242 config.time_shift = 4;
243 config.time_mult = 3;
244 config.time_zero = 0xa00b00ull;
246 errcode = pev_time_to_tsc(&tsc, 0xa00b43ull, &config);
247 ptu_int_eq(errcode, 0);
248 ptu_uint_eq(tsc, 0x165ull);
253 static struct ptunit_result time_from_tsc(void)
255 struct pev_config config;
259 pev_config_init(&config);
260 config.time_shift = 4;
261 config.time_mult = 3;
262 config.time_zero = 0xa00b00ull;
264 errcode = pev_time_from_tsc(&time, 0x23bull, &config);
265 ptu_int_eq(errcode, 0);
266 ptu_uint_eq(time, 0xa00b6bull);
271 static struct ptunit_result time_to_tsc_bad_config(void)
273 struct pev_config config;
277 memset(&config, 0, sizeof(config));
278 config.time_mult = 1;
280 errcode = pev_time_to_tsc(&tsc, 0x0ull, &config);
281 ptu_int_eq(errcode, -pte_bad_config);
283 config.size = sizeof(config);
284 config.time_mult = 0;
286 errcode = pev_time_to_tsc(&tsc, 0x0ull, &config);
287 ptu_int_eq(errcode, -pte_bad_config);
292 static struct ptunit_result time_from_tsc_bad_config(void)
294 struct pev_config config;
298 memset(&config, 0, sizeof(config));
299 config.time_mult = 1;
301 errcode = pev_time_from_tsc(&time, 0x0ull, &config);
302 ptu_int_eq(errcode, -pte_bad_config);
304 config.size = sizeof(config);
305 config.time_mult = 0;
307 errcode = pev_time_from_tsc(&time, 0x0ull, &config);
308 ptu_int_eq(errcode, -pte_bad_config);
313 static struct ptunit_result read_bad_config(void)
316 struct perf_event_header header;
319 struct pev_config config;
320 struct pev_event event;
323 memset(input.buffer, 0, sizeof(input.buffer));
324 input.header.type = PERF_RECORD_ITRACE_START;
325 input.header.size = sizeof(event.record.itrace_start) + 0x8;
327 memset(&config, 0, sizeof(config));
328 config.sample_type |= (uint64_t) PERF_SAMPLE_CPU;
330 errcode = pev_read(&event, input.buffer,
331 input.buffer + sizeof(input.buffer), &config);
332 ptu_int_eq(errcode, -pte_bad_config);
337 static struct ptunit_result write_bad_config(void)
339 struct pev_record_itrace_start itrace_start;
340 struct pev_config config;
341 struct pev_event event;
346 memset(&itrace_start, 0, sizeof(itrace_start));
348 pev_event_init(&event);
349 event.type = PERF_RECORD_ITRACE_START;
350 event.record.itrace_start = &itrace_start;
351 event.sample.cpu = &cpu;
353 memset(&config, 0, sizeof(config));
354 config.sample_type |= (uint64_t) PERF_SAMPLE_CPU;
356 errcode = pev_write(&event, buffer, buffer + sizeof(buffer), &config);
357 ptu_int_eq(errcode, -pte_bad_config);
362 static struct ptunit_result bad_string(uint16_t type)
365 struct perf_event_header header;
369 struct pev_config config;
370 struct pev_event event;
373 pev_config_init(&config);
375 memset(input.buffer, 0xcc, sizeof(input.buffer));
376 input.header.type = type;
377 input.header.misc = 0;
378 input.header.size = 0x50;
380 errcode = pev_read(&event, input.buffer,
381 input.buffer + sizeof(input.buffer), &config);
382 ptu_int_eq(errcode, -pte_bad_packet);
387 static struct ptunit_result mmap(struct pev_fixture *pfix)
390 struct pev_record_mmap record;
394 mmap.record.pid = 0xa;
395 mmap.record.tid = 0xb;
396 mmap.record.addr = 0xa00100ull;
397 mmap.record.len = 0x110ull;
398 mmap.record.pgoff = 0xb0000ull;
399 strcpy(mmap.record.filename, "foo.so");
401 pfix->event[0].record.mmap = &mmap.record;
402 pfix->event[0].type = PERF_RECORD_MMAP;
404 ptu_test(pfix_read_write, pfix);
405 ptu_test(pfix_check_sample, pfix);
407 ptu_int_eq(pfix->event[1].type, pfix->event[0].type);
408 ptu_ptr(pfix->event[1].record.mmap);
409 ptu_uint_eq(pfix->event[1].record.mmap->pid, mmap.record.pid);
410 ptu_uint_eq(pfix->event[1].record.mmap->tid, mmap.record.tid);
411 ptu_uint_eq(pfix->event[1].record.mmap->addr, mmap.record.addr);
412 ptu_uint_eq(pfix->event[1].record.mmap->len, mmap.record.len);
413 ptu_uint_eq(pfix->event[1].record.mmap->pgoff, mmap.record.pgoff);
414 ptu_str_eq(pfix->event[1].record.mmap->filename, mmap.record.filename);
419 static struct ptunit_result lost(struct pev_fixture *pfix)
421 struct pev_record_lost lost;
426 pfix->event[0].record.lost = &lost;
427 pfix->event[0].type = PERF_RECORD_LOST;
429 ptu_test(pfix_read_write, pfix);
430 ptu_test(pfix_check_sample, pfix);
432 ptu_int_eq(pfix->event[1].type, pfix->event[0].type);
433 ptu_ptr(pfix->event[1].record.lost);
434 ptu_uint_eq(pfix->event[1].record.lost->id, lost.id);
435 ptu_uint_eq(pfix->event[1].record.lost->lost, lost.lost);
440 static struct ptunit_result comm(struct pev_fixture *pfix)
443 struct pev_record_comm record;
447 comm.record.pid = 0xa;
448 comm.record.tid = 0xb;
449 strcpy(comm.record.comm, "foo -b ar");
451 pfix->event[0].record.comm = &comm.record;
452 pfix->event[0].type = PERF_RECORD_COMM;
454 ptu_test(pfix_read_write, pfix);
455 ptu_test(pfix_check_sample, pfix);
457 ptu_int_eq(pfix->event[1].type, pfix->event[0].type);
458 ptu_ptr(pfix->event[1].record.comm);
459 ptu_uint_eq(pfix->event[1].record.comm->pid, comm.record.pid);
460 ptu_uint_eq(pfix->event[1].record.comm->tid, comm.record.tid);
461 ptu_str_eq(pfix->event[1].record.comm->comm, comm.record.comm);
466 static struct ptunit_result record_exit(struct pev_fixture *pfix)
468 struct pev_record_exit exit;
474 exit.time = 0xabcdefull;
476 pfix->event[0].record.exit = &exit;
477 pfix->event[0].type = PERF_RECORD_EXIT;
479 ptu_test(pfix_read_write, pfix);
480 ptu_test(pfix_check_sample, pfix);
482 ptu_int_eq(pfix->event[1].type, pfix->event[0].type);
483 ptu_ptr(pfix->event[1].record.exit);
484 ptu_uint_eq(pfix->event[1].record.exit->pid, exit.pid);
485 ptu_uint_eq(pfix->event[1].record.exit->ppid, exit.ppid);
486 ptu_uint_eq(pfix->event[1].record.exit->tid, exit.tid);
487 ptu_uint_eq(pfix->event[1].record.exit->ptid, exit.ptid);
488 ptu_uint_eq(pfix->event[1].record.exit->time, exit.time);
493 static struct ptunit_result throttle(struct pev_fixture *pfix)
495 struct pev_record_throttle throttle;
497 throttle.time = 0xabcdeull;
498 throttle.id = 0xa042ull;
499 throttle.stream_id = 0xb00ull;
501 pfix->event[0].record.throttle = &throttle;
502 pfix->event[0].type = PERF_RECORD_THROTTLE;
504 ptu_test(pfix_read_write, pfix);
505 ptu_test(pfix_check_sample, pfix);
507 ptu_int_eq(pfix->event[1].type, pfix->event[0].type);
508 ptu_ptr(pfix->event[1].record.throttle);
509 ptu_uint_eq(pfix->event[1].record.throttle->time, throttle.time);
510 ptu_uint_eq(pfix->event[1].record.throttle->id, throttle.id);
511 ptu_uint_eq(pfix->event[1].record.throttle->stream_id,
517 static struct ptunit_result unthrottle(struct pev_fixture *pfix)
519 struct pev_record_throttle throttle;
521 throttle.time = 0xc00042ull;
522 throttle.id = 0x23ull;
523 throttle.stream_id = 0x0ull;
525 pfix->event[0].record.throttle = &throttle;
526 pfix->event[0].type = PERF_RECORD_UNTHROTTLE;
528 ptu_test(pfix_read_write, pfix);
529 ptu_test(pfix_check_sample, pfix);
531 ptu_int_eq(pfix->event[1].type, pfix->event[0].type);
532 ptu_ptr(pfix->event[1].record.throttle);
533 ptu_uint_eq(pfix->event[1].record.throttle->time, throttle.time);
534 ptu_uint_eq(pfix->event[1].record.throttle->id, throttle.id);
535 ptu_uint_eq(pfix->event[1].record.throttle->stream_id,
541 static struct ptunit_result fork(struct pev_fixture *pfix)
543 struct pev_record_fork fork;
549 fork.time = 0xabcdefull;
551 pfix->event[0].record.fork = ⋔
552 pfix->event[0].type = PERF_RECORD_FORK;
554 ptu_test(pfix_read_write, pfix);
555 ptu_test(pfix_check_sample, pfix);
557 ptu_int_eq(pfix->event[1].type, pfix->event[0].type);
558 ptu_ptr(pfix->event[1].record.fork);
559 ptu_uint_eq(pfix->event[1].record.fork->pid, fork.pid);
560 ptu_uint_eq(pfix->event[1].record.fork->ppid, fork.ppid);
561 ptu_uint_eq(pfix->event[1].record.fork->tid, fork.tid);
562 ptu_uint_eq(pfix->event[1].record.fork->ptid, fork.ptid);
563 ptu_uint_eq(pfix->event[1].record.fork->time, fork.time);
568 static struct ptunit_result mmap2(struct pev_fixture *pfix)
571 struct pev_record_mmap2 record;
575 mmap2.record.pid = 0xa;
576 mmap2.record.tid = 0xb;
577 mmap2.record.addr = 0xa00100ull;
578 mmap2.record.len = 0x110ull;
579 mmap2.record.pgoff = 0xb0000ull;
580 mmap2.record.maj = 7;
581 mmap2.record.min = 2;
582 mmap2.record.ino = 0x8080ull;
583 mmap2.record.ino_generation = 0x4ull;
584 mmap2.record.prot = 0x755;
585 mmap2.record.flags = 0;
586 strcpy(mmap2.record.filename, "foo.so");
588 pfix->event[0].record.mmap2 = &mmap2.record;
589 pfix->event[0].type = PERF_RECORD_MMAP2;
591 ptu_test(pfix_read_write, pfix);
592 ptu_test(pfix_check_sample, pfix);
594 ptu_int_eq(pfix->event[1].type, pfix->event[0].type);
595 ptu_ptr(pfix->event[1].record.mmap2);
596 ptu_uint_eq(pfix->event[1].record.mmap2->pid, mmap2.record.pid);
597 ptu_uint_eq(pfix->event[1].record.mmap2->tid, mmap2.record.tid);
598 ptu_uint_eq(pfix->event[1].record.mmap2->addr, mmap2.record.addr);
599 ptu_uint_eq(pfix->event[1].record.mmap2->len, mmap2.record.len);
600 ptu_uint_eq(pfix->event[1].record.mmap2->pgoff, mmap2.record.pgoff);
601 ptu_uint_eq(pfix->event[1].record.mmap2->maj, mmap2.record.maj);
602 ptu_uint_eq(pfix->event[1].record.mmap2->min, mmap2.record.min);
603 ptu_uint_eq(pfix->event[1].record.mmap2->ino, mmap2.record.ino);
604 ptu_uint_eq(pfix->event[1].record.mmap2->ino_generation,
605 mmap2.record.ino_generation);
606 ptu_uint_eq(pfix->event[1].record.mmap2->prot, mmap2.record.prot);
607 ptu_uint_eq(pfix->event[1].record.mmap2->flags, mmap2.record.flags);
608 ptu_str_eq(pfix->event[1].record.mmap2->filename,
609 mmap2.record.filename);
614 static struct ptunit_result aux(struct pev_fixture *pfix)
616 struct pev_record_aux aux;
618 aux.aux_offset = 0xc00042ull;
619 aux.aux_size = 0x23ull;
622 pfix->event[0].record.aux = &aux;
623 pfix->event[0].type = PERF_RECORD_AUX;
625 ptu_test(pfix_read_write, pfix);
626 ptu_test(pfix_check_sample, pfix);
628 ptu_int_eq(pfix->event[1].type, pfix->event[0].type);
629 ptu_ptr(pfix->event[1].record.aux);
630 ptu_uint_eq(pfix->event[1].record.aux->aux_offset, aux.aux_offset);
631 ptu_uint_eq(pfix->event[1].record.aux->aux_size, aux.aux_size);
632 ptu_uint_eq(pfix->event[1].record.aux->flags, aux.flags);
637 static struct ptunit_result itrace_start(struct pev_fixture *pfix)
639 struct pev_record_itrace_start itrace_start;
641 itrace_start.pid = 0xa;
642 itrace_start.tid = 0xb;
644 pfix->event[0].record.itrace_start = &itrace_start;
645 pfix->event[0].type = PERF_RECORD_ITRACE_START;
647 ptu_test(pfix_read_write, pfix);
648 ptu_test(pfix_check_sample, pfix);
650 ptu_int_eq(pfix->event[1].type, pfix->event[0].type);
651 ptu_ptr(pfix->event[1].record.itrace_start);
652 ptu_uint_eq(pfix->event[1].record.itrace_start->pid, itrace_start.pid);
653 ptu_uint_eq(pfix->event[1].record.itrace_start->tid, itrace_start.tid);
658 static struct ptunit_result lost_samples(struct pev_fixture *pfix)
660 struct pev_record_lost_samples lost_samples;
662 lost_samples.lost = 0xc00042ull;
664 pfix->event[0].record.lost_samples = &lost_samples;
665 pfix->event[0].type = PERF_RECORD_LOST_SAMPLES;
667 ptu_test(pfix_read_write, pfix);
668 ptu_test(pfix_check_sample, pfix);
670 ptu_int_eq(pfix->event[1].type, pfix->event[0].type);
671 ptu_ptr(pfix->event[1].record.lost_samples);
672 ptu_uint_eq(pfix->event[1].record.lost_samples->lost,
678 static struct ptunit_result switch_task(struct pev_fixture *pfix,
681 pfix->event[0].type = PERF_RECORD_SWITCH;
682 pfix->event[0].misc = switch_out ? PERF_RECORD_MISC_SWITCH_OUT : 0;
684 ptu_test(pfix_read_write, pfix);
685 ptu_test(pfix_check_sample, pfix);
687 ptu_int_eq(pfix->event[1].type, pfix->event[0].type);
688 ptu_int_eq(pfix->event[1].misc, pfix->event[0].misc);
693 static struct ptunit_result switch_cpu_wide(struct pev_fixture *pfix,
696 struct pev_record_switch_cpu_wide switch_cpu_wide;
698 switch_cpu_wide.next_prev_pid = 0xa;
699 switch_cpu_wide.next_prev_tid = 0xb;
701 pfix->event[0].record.switch_cpu_wide = &switch_cpu_wide;
702 pfix->event[0].type = PERF_RECORD_SWITCH_CPU_WIDE;
703 pfix->event[0].misc = switch_out ? PERF_RECORD_MISC_SWITCH_OUT : 0;
705 ptu_test(pfix_read_write, pfix);
706 ptu_test(pfix_check_sample, pfix);
708 ptu_int_eq(pfix->event[1].type, pfix->event[0].type);
709 ptu_int_eq(pfix->event[1].misc, pfix->event[0].misc);
710 ptu_ptr(pfix->event[1].record.switch_cpu_wide);
711 ptu_uint_eq(pfix->event[1].record.switch_cpu_wide->next_prev_pid,
712 switch_cpu_wide.next_prev_pid);
713 ptu_uint_eq(pfix->event[1].record.switch_cpu_wide->next_prev_tid,
714 switch_cpu_wide.next_prev_tid);
719 int main(int argc, char **argv)
721 struct pev_fixture pfix, pfix_time, pfix_who;
722 struct ptunit_suite suite;
724 pfix.init = pfix_init;
727 pfix_time.init = pfix_init_sample_time;
728 pfix_time.fini = NULL;
730 pfix_who.init = pfix_init_sample_who;
731 pfix_who.fini = NULL;
733 suite = ptunit_mk_suite(argc, argv);
735 ptu_run(suite, time_to_tsc_null);
736 ptu_run(suite, time_from_tsc_null);
738 ptu_run(suite, time_to_tsc);
739 ptu_run(suite, time_from_tsc);
741 ptu_run(suite, time_to_tsc_bad_config);
742 ptu_run(suite, time_from_tsc_bad_config);
743 ptu_run(suite, read_bad_config);
744 ptu_run(suite, write_bad_config);
746 ptu_run_p(suite, bad_string, PERF_RECORD_MMAP);
747 ptu_run_p(suite, bad_string, PERF_RECORD_COMM);
748 ptu_run_p(suite, bad_string, PERF_RECORD_MMAP2);
750 ptu_run_f(suite, mmap, pfix);
751 ptu_run_f(suite, lost, pfix);
752 ptu_run_f(suite, comm, pfix);
753 ptu_run_f(suite, record_exit, pfix);
754 ptu_run_f(suite, throttle, pfix);
755 ptu_run_f(suite, unthrottle, pfix);
756 ptu_run_f(suite, fork, pfix);
757 ptu_run_f(suite, mmap2, pfix);
758 ptu_run_f(suite, aux, pfix);
759 ptu_run_f(suite, itrace_start, pfix);
760 ptu_run_f(suite, lost_samples, pfix);
761 ptu_run_fp(suite, switch_task, pfix, 0);
762 ptu_run_fp(suite, switch_task, pfix, 1);
763 ptu_run_fp(suite, switch_cpu_wide, pfix, 0);
764 ptu_run_fp(suite, switch_cpu_wide, pfix, 1);
766 ptu_run_f(suite, mmap, pfix_time);
767 ptu_run_f(suite, lost, pfix_time);
768 ptu_run_f(suite, comm, pfix_time);
769 ptu_run_f(suite, record_exit, pfix_time);
770 ptu_run_f(suite, throttle, pfix_time);
771 ptu_run_f(suite, unthrottle, pfix_time);
772 ptu_run_f(suite, fork, pfix_time);
773 ptu_run_f(suite, mmap2, pfix_time);
774 ptu_run_f(suite, aux, pfix_time);
775 ptu_run_f(suite, itrace_start, pfix_time);
776 ptu_run_f(suite, lost_samples, pfix_time);
777 ptu_run_fp(suite, switch_task, pfix_time, 0);
778 ptu_run_fp(suite, switch_task, pfix_time, 1);
779 ptu_run_fp(suite, switch_cpu_wide, pfix_time, 0);
780 ptu_run_fp(suite, switch_cpu_wide, pfix_time, 1);
782 ptu_run_f(suite, mmap, pfix_who);
783 ptu_run_f(suite, lost, pfix_who);
784 ptu_run_f(suite, comm, pfix_who);
785 ptu_run_f(suite, record_exit, pfix_who);
786 ptu_run_f(suite, throttle, pfix_who);
787 ptu_run_f(suite, unthrottle, pfix_who);
788 ptu_run_f(suite, fork, pfix_who);
789 ptu_run_f(suite, mmap2, pfix_who);
790 ptu_run_f(suite, aux, pfix_who);
791 ptu_run_f(suite, itrace_start, pfix_who);
792 ptu_run_f(suite, lost_samples, pfix_who);
793 ptu_run_fp(suite, switch_task, pfix_who, 0);
794 ptu_run_fp(suite, switch_task, pfix_who, 1);
795 ptu_run_fp(suite, switch_cpu_wide, pfix_who, 0);
796 ptu_run_fp(suite, switch_cpu_wide, pfix_who, 1);
798 return ptunit_report(&suite);