1/* CTF 1.8 */ 2typealias integer { size = 8; align = 8; signed = true; } := int8_t; 3typealias integer { size = 8; align = 8; signed = false; } := uint8_t; 4typealias integer { size = 16; align = 8; signed = false; } := uint16_t; 5typealias integer { size = 32; align = 8; signed = false; } := uint32_t; 6typealias integer { size = 32; align = 8; signed = true; } := int32_t; 7typealias integer { size = 64; align = 8; signed = false; } := uint64_t; 8typealias integer { size = 8; align = 8; signed = false; encoding = ASCII; } := ctf_bounded_string_t; 9 10struct event_header { 11 uint32_t timestamp; 12 uint8_t id; 13}; 14 15trace { 16 major = 1; 17 minor = 8; 18 byte_order = le; 19}; 20 21stream { 22 event.header := struct event_header; 23}; 24 25event { 26 name = thread_switched_out; 27 id = 0x10; 28 fields := struct { 29 uint32_t thread_id; 30 ctf_bounded_string_t name[20]; 31 }; 32}; 33 34event { 35 name = thread_switched_in; 36 id = 0x11; 37 fields := struct { 38 uint32_t thread_id; 39 ctf_bounded_string_t name[20]; 40 }; 41}; 42 43event { 44 name = thread_priority_set; 45 id = 0x12; 46 fields := struct { 47 uint32_t thread_id; 48 ctf_bounded_string_t name[20]; 49 int8_t prio; 50 }; 51 52}; 53 54event { 55 name = thread_create; 56 id = 0x13; 57 fields := struct { 58 uint32_t thread_id; 59 ctf_bounded_string_t name[20]; 60 }; 61}; 62 63event { 64 name = thread_abort; 65 id = 0x14; 66 fields := struct { 67 uint32_t thread_id; 68 ctf_bounded_string_t name[20]; 69 }; 70}; 71 72event { 73 name = thread_suspend; 74 id = 0x15; 75 fields := struct { 76 uint32_t thread_id; 77 ctf_bounded_string_t name[20]; 78 }; 79}; 80 81event { 82 name = thread_resume; 83 id = 0x16; 84 fields := struct { 85 uint32_t thread_id; 86 ctf_bounded_string_t name[20]; 87 }; 88}; 89event { 90 name = thread_ready; 91 id = 0x17; 92 fields := struct { 93 uint32_t thread_id; 94 ctf_bounded_string_t name[20]; 95 }; 96}; 97 98event { 99 name = thread_pending; 100 id = 0x18; 101 fields := struct { 102 uint32_t thread_id; 103 ctf_bounded_string_t name[20]; 104 }; 105}; 106 107event { 108 name = thread_info; 109 id = 0x19; 110 fields := struct { 111 uint32_t thread_id; 112 ctf_bounded_string_t name[20]; 113 uint32_t stack_base; 114 uint32_t stack_size; 115 }; 116}; 117 118event { 119 name = thread_name_set; 120 id = 0x1a; 121 fields := struct { 122 uint32_t thread_id; 123 ctf_bounded_string_t name[20]; 124 }; 125}; 126 127event { 128 name = isr_enter; 129 id = 0x1B; 130}; 131 132event { 133 name = isr_exit; 134 id = 0x1C; 135}; 136 137event { 138 name = isr_exit_to_scheduler; 139 id = 0x1D; 140}; 141 142event { 143 name = idle; 144 id = 0x1E; 145}; 146 147event { 148 name = semaphore_init; 149 id = 0x21; 150 fields := struct { 151 uint32_t id; 152 int32_t ret; 153 }; 154}; 155 156event { 157 name = semaphore_give_enter; 158 id = 0x22; 159 fields := struct { 160 uint32_t id; 161 }; 162}; 163 164event { 165 name = semaphore_give_exit; 166 id = 0x23; 167 fields := struct { 168 uint32_t id; 169 }; 170}; 171 172event { 173 name = semaphore_take_enter; 174 id = 0x24; 175 fields := struct { 176 uint32_t id; 177 uint32_t timeout; 178 }; 179}; 180 181event { 182 name = semaphore_take_exit; 183 id = 0x26; 184 fields := struct { 185 uint32_t id; 186 uint32_t timeout; 187 int32_t ret; 188 }; 189}; 190 191 192event { 193 name = semaphore_take_blocking; 194 id = 0x25; 195 fields := struct { 196 uint32_t id; 197 uint32_t timeout; 198 }; 199}; 200 201 202event { 203 name = semaphore_reset; 204 id = 0x27; 205 fields := struct { 206 uint32_t id; 207 }; 208}; 209 210event { 211 name = mutex_init; 212 id = 0x28; 213 fields := struct { 214 uint32_t id; 215 int32_t ret; 216 }; 217}; 218 219event { 220 name = mutex_lock_enter; 221 id = 0x29; 222 fields := struct { 223 uint32_t id; 224 uint32_t timeout; 225 }; 226}; 227 228event { 229 name = mutex_lock_blocking; 230 id = 0x2A; 231 fields := struct { 232 uint32_t id; 233 uint32_t timeout; 234 }; 235}; 236 237event { 238 name = mutex_lock_exit; 239 id = 0x2B; 240 fields := struct { 241 uint32_t id; 242 uint32_t timeout; 243 int32_t ret; 244 }; 245}; 246 247event { 248 name = mutex_unlock_enter; 249 id = 0x2C; 250 fields := struct { 251 uint32_t id; 252 }; 253}; 254 255event { 256 name = mutex_unlock_exit; 257 id = 0x2D; 258 fields := struct { 259 uint32_t id; 260 }; 261}; 262 263event { 264 name = timer_init; 265 id = 0x2E; 266 fields := struct { 267 uint32_t id; 268 }; 269}; 270 271event { 272 name = timer_start; 273 id = 0x2F; 274 fields := struct { 275 uint32_t id; 276 uint32_t duration; 277 uint32_t period; 278 }; 279}; 280 281event { 282 name = timer_stop; 283 id = 0x30; 284 fields := struct { 285 uint32_t id; 286 }; 287}; 288 289event { 290 name = timer_status_sync_enter; 291 id = 0x31; 292 fields := struct { 293 uint32_t id; 294 }; 295}; 296 297event { 298 name = timer_status_sync_blocking; 299 id = 0x32; 300 fields := struct { 301 uint32_t id; 302 }; 303}; 304 305event { 306 name = timer_status_sync_exit; 307 id = 0x33; 308 fields := struct { 309 uint32_t id; 310 uint32_t result; 311 }; 312}; 313 314event { 315 name = user_mode_enter; 316 id = 0x34; 317 fields := struct { 318 uint32_t thread_id; 319 ctf_bounded_string_t name[20]; 320 }; 321}; 322 323event { 324 name = thread_wakeup; 325 id = 0x35; 326 fields := struct { 327 uint32_t thread_id; 328 ctf_bounded_string_t name[20]; 329 }; 330}; 331 332event { 333 name = socket_init; 334 id = 0x36; 335 fields := struct { 336 uint32_t id; 337 uint32_t family; 338 uint32_t type; 339 uint32_t proto; 340 }; 341}; 342 343event { 344 name = socket_close_enter; 345 id = 0x37; 346 fields := struct { 347 uint32_t id; 348 }; 349}; 350 351event { 352 name = socket_close_exit; 353 id = 0x38; 354 fields := struct { 355 uint32_t id; 356 int32_t result; 357 }; 358}; 359 360event { 361 name = socket_shutdown_enter; 362 id = 0x39; 363 fields := struct { 364 uint32_t id; 365 uint32_t how; 366 }; 367}; 368 369event { 370 name = socket_shutdown_exit; 371 id = 0x3A; 372 fields := struct { 373 uint32_t id; 374 int32_t result; 375 }; 376}; 377 378event { 379 name = socket_bind_enter; 380 id = 0x3B; 381 fields := struct { 382 uint32_t id; 383 ctf_bounded_string_t address[46]; 384 uint32_t address_length; 385 uint16_t port; 386 }; 387}; 388 389event { 390 name = socket_bind_exit; 391 id = 0x3C; 392 fields := struct { 393 uint32_t id; 394 int32_t result; 395 }; 396}; 397 398event { 399 name = socket_connect_enter; 400 id = 0x3D; 401 fields := struct { 402 uint32_t id; 403 ctf_bounded_string_t address[46]; 404 uint32_t address_length; 405 }; 406}; 407 408event { 409 name = socket_connect_exit; 410 id = 0x3E; 411 fields := struct { 412 uint32_t id; 413 int32_t result; 414 }; 415}; 416 417event { 418 name = socket_listen_enter; 419 id = 0x3F; 420 fields := struct { 421 uint32_t id; 422 uint32_t backlog; 423 }; 424}; 425 426event { 427 name = socket_listen_exit; 428 id = 0x40; 429 fields := struct { 430 uint32_t id; 431 int32_t result; 432 }; 433}; 434 435event { 436 name = socket_accept_enter; 437 id = 0x41; 438 fields := struct { 439 uint32_t id; 440 }; 441}; 442 443event { 444 name = socket_accept_exit; 445 id = 0x42; 446 fields := struct { 447 uint32_t id; 448 ctf_bounded_string_t address[46]; 449 uint32_t address_length; 450 uint16_t port; 451 int32_t result; 452 }; 453}; 454 455event { 456 name = socket_sendto_enter; 457 id = 0x43; 458 fields := struct { 459 uint32_t id; 460 uint32_t data_length; 461 uint32_t flags; 462 ctf_bounded_string_t address[46]; 463 uint32_t address_length; 464 }; 465}; 466 467event { 468 name = socket_sendto_exit; 469 id = 0x44; 470 fields := struct { 471 uint32_t id; 472 int32_t result; 473 }; 474}; 475 476event { 477 name = socket_sendmsg_enter; 478 id = 0x45; 479 fields := struct { 480 uint32_t id; 481 uint32_t flags; 482 uint32_t msghdr; 483 ctf_bounded_string_t address[46]; 484 uint32_t data_length; 485 }; 486}; 487 488event { 489 name = socket_sendmsg_exit; 490 id = 0x46; 491 fields := struct { 492 uint32_t id; 493 int32_t result; 494 }; 495}; 496 497event { 498 name = socket_recvfrom_enter; 499 id = 0x47; 500 fields := struct { 501 uint32_t id; 502 uint32_t max_length; 503 uint32_t flags; 504 uint32_t address; 505 uint32_t address_length; 506 }; 507}; 508 509event { 510 name = socket_recvfrom_exit; 511 id = 0x48; 512 fields := struct { 513 uint32_t id; 514 ctf_bounded_string_t address[46]; 515 uint32_t address_length; 516 int32_t result; 517 }; 518}; 519 520event { 521 name = socket_recvmsg_enter; 522 id = 0x49; 523 fields := struct { 524 uint32_t id; 525 uint32_t msg; 526 uint32_t max_msg_length; 527 int32_t result; 528 }; 529}; 530 531event { 532 name = socket_recvmsg_exit; 533 id = 0x4A; 534 fields := struct { 535 uint32_t id; 536 uint32_t msg_length; 537 ctf_bounded_string_t address[46]; 538 int32_t result; 539 }; 540}; 541 542event { 543 name = socket_fcntl_enter; 544 id = 0x4B; 545 fields := struct { 546 uint32_t id; 547 uint32_t cmd; 548 uint32_t flags; 549 }; 550}; 551 552event { 553 name = socket_fcntl_exit; 554 id = 0x4C; 555 fields := struct { 556 uint32_t id; 557 int32_t result; 558 }; 559}; 560 561event { 562 name = socket_ioctl_enter; 563 id = 0x4D; 564 fields := struct { 565 uint32_t id; 566 uint32_t request; 567 }; 568}; 569 570event { 571 name = socket_ioctl_exit; 572 id = 0x4E; 573 fields := struct { 574 uint32_t id; 575 int32_t result; 576 }; 577}; 578 579event { 580 name = socket_poll_enter; 581 id = 0x4F; 582 fields := struct { 583 uint32_t fds; 584 uint32_t num_fds; 585 int32_t timeout; 586 }; 587}; 588 589event { 590 name = socket_poll_value; 591 id = 0x50; 592 fields := struct { 593 int32_t fd; 594 uint16_t events; 595 }; 596}; 597 598event { 599 name = socket_poll_exit; 600 id = 0x51; 601 fields := struct { 602 uint32_t fds; 603 uint32_t num_fds; 604 int32_t result; 605 }; 606}; 607 608event { 609 name = socket_getsockopt_enter; 610 id = 0x52; 611 fields := struct { 612 uint32_t id; 613 uint32_t level; 614 uint32_t optname; 615 }; 616}; 617 618event { 619 name = socket_getsockopt_exit; 620 id = 0x53; 621 fields := struct { 622 uint32_t id; 623 uint32_t level; 624 uint32_t optname; 625 uint32_t optval; 626 uint32_t optlen; 627 int32_t result; 628 }; 629}; 630 631event { 632 name = socket_setsockopt_enter; 633 id = 0x54; 634 fields := struct { 635 uint32_t id; 636 uint32_t level; 637 uint32_t optname; 638 uint32_t optval; 639 uint32_t optlen; 640 }; 641}; 642 643event { 644 name = socket_setsockopt_exit; 645 id = 0x55; 646 fields := struct { 647 uint32_t id; 648 int32_t result; 649 }; 650}; 651 652event { 653 name = socket_getpeername_enter; 654 id = 0x56; 655 fields := struct { 656 uint32_t id; 657 }; 658}; 659 660event { 661 name = socket_getpeername_exit; 662 id = 0x57; 663 fields := struct { 664 uint32_t id; 665 ctf_bounded_string_t address[46]; 666 uint32_t address_length; 667 int32_t result; 668 }; 669}; 670 671event { 672 name = socket_getsockname_enter; 673 id = 0x58; 674 fields := struct { 675 uint32_t id; 676 }; 677}; 678 679event { 680 name = socket_getsockname_exit; 681 id = 0x59; 682 fields := struct { 683 uint32_t id; 684 ctf_bounded_string_t address[46]; 685 uint32_t address_length; 686 int32_t result; 687 }; 688}; 689 690event { 691 name = socket_socketpair_enter; 692 id = 0x5A; 693 fields := struct { 694 uint32_t family; 695 uint32_t type; 696 uint32_t proto; 697 uint32_t sv; 698 }; 699}; 700 701event { 702 name = socket_socketpair_exit; 703 id = 0x5B; 704 fields := struct { 705 int32_t socket0; 706 int32_t socket1; 707 int32_t result; 708 }; 709}; 710 711event { 712 name = net_recv_data_enter; 713 id = 0x5C; 714 fields := struct { 715 int32_t if_index; 716 uint32_t iface; 717 uint32_t pkt; 718 uint32_t pkt_len; 719 }; 720}; 721 722event { 723 name = net_recv_data_exit; 724 id = 0x5D; 725 fields := struct { 726 int32_t if_index; 727 uint32_t iface; 728 uint32_t pkt; 729 int32_t result; 730 }; 731}; 732 733event { 734 name = net_send_data_enter; 735 id = 0x5E; 736 fields := struct { 737 int32_t if_index; 738 uint32_t iface; 739 uint32_t pkt; 740 uint32_t pkt_len; 741 }; 742}; 743 744event { 745 name = net_send_data_exit; 746 id = 0x5F; 747 fields := struct { 748 int32_t if_index; 749 uint32_t iface; 750 uint32_t pkt; 751 int32_t result; 752 }; 753}; 754 755event { 756 name = net_rx_time; 757 id = 0x60; 758 fields := struct { 759 int32_t if_index; 760 uint32_t iface; 761 uint32_t pkt; 762 uint32_t priority; 763 uint32_t traffic_class; 764 uint32_t duration_us; 765 }; 766}; 767 768event { 769 name = net_tx_time; 770 id = 0x61; 771 fields := struct { 772 int32_t if_index; 773 uint32_t iface; 774 uint32_t pkt; 775 uint32_t priority; 776 uint32_t traffic_class; 777 uint32_t duration_us; 778 }; 779}; 780 781event { 782 name = named_event; 783 id = 0x62; 784 fields := struct { 785 ctf_bounded_string_t name[20]; 786 uint32_t arg0; 787 uint32_t arg1; 788 }; 789}; 790 791event { 792 name = gpio_pin_configure_interrupt_enter; 793 id = 0x63; 794 fields := struct { 795 uint32_t port; 796 uint32_t pin; 797 uint32_t flags; 798 }; 799}; 800 801event { 802 name = gpio_pin_configure_interrupt_exit; 803 id = 0x64; 804 fields := struct { 805 uint32_t port; 806 uint32_t pin; 807 uint32_t ret; 808 }; 809}; 810 811event { 812 name = gpio_pin_configure_enter; 813 id = 0x65; 814 fields := struct { 815 uint32_t port; 816 uint32_t pin; 817 uint32_t flags; 818 }; 819}; 820 821event { 822 name = gpio_pin_configure_exit; 823 id = 0x66; 824 fields := struct { 825 uint32_t port; 826 uint32_t pin; 827 uint32_t ret; 828 }; 829}; 830 831event { 832 name = gpio_port_get_direction_enter; 833 id = 0x67; 834 fields := struct { 835 uint32_t port; 836 uint32_t map; 837 uint32_t inputs; 838 uint32_t outputs; 839 }; 840}; 841 842event { 843 name = gpio_port_get_direction_exit; 844 id = 0x68; 845 fields := struct { 846 uint32_t port; 847 uint32_t ret; 848 }; 849}; 850 851event { 852 name = gpio_pin_get_config_enter; 853 id = 0x69; 854 fields := struct { 855 uint32_t port; 856 uint32_t pin; 857 }; 858}; 859 860event { 861 name = gpio_pin_get_config_exit; 862 id = 0x6A; 863 fields := struct { 864 uint32_t port; 865 uint32_t pin; 866 uint32_t ret; 867 }; 868}; 869 870event { 871 name = gpio_port_get_raw_enter; 872 id = 0x6B; 873 fields := struct { 874 uint32_t port; 875 uint32_t value; 876 }; 877}; 878 879event { 880 name = gpio_port_get_raw_exit; 881 id = 0x6C; 882 fields := struct { 883 uint32_t port; 884 uint32_t ret; 885 }; 886}; 887 888event { 889 name = gpio_port_set_masked_raw_enter; 890 id = 0x6D; 891 fields := struct { 892 uint32_t port; 893 uint32_t mask; 894 uint32_t value; 895 }; 896}; 897 898event { 899 name = gpio_port_set_masked_raw_exit; 900 id = 0x6E; 901 fields := struct { 902 uint32_t port; 903 uint32_t ret; 904 }; 905}; 906 907event { 908 name = gpio_port_set_bits_raw_enter; 909 id = 0x6F; 910 fields := struct { 911 uint32_t port; 912 uint32_t pins; 913 }; 914}; 915 916event { 917 name = gpio_port_set_bits_raw_exit; 918 id = 0x70; 919 fields := struct { 920 uint32_t port; 921 uint32_t ret; 922 }; 923}; 924 925event { 926 name = gpio_port_clear_bits_raw_enter; 927 id = 0x71; 928 fields := struct { 929 uint32_t port; 930 uint32_t pins; 931 }; 932}; 933 934event { 935 name = gpio_port_clear_bits_raw_exit; 936 id = 0x72; 937 fields := struct { 938 uint32_t port; 939 uint32_t ret; 940 }; 941}; 942 943event { 944 name = gpio_port_toggle_bits_enter; 945 id = 0x73; 946 fields := struct { 947 uint32_t port; 948 uint32_t pins; 949 }; 950}; 951 952event { 953 name = gpio_port_toggle_bits_exit; 954 id = 0x74; 955 fields := struct { 956 uint32_t port; 957 uint32_t ret; 958 }; 959}; 960 961event { 962 name = gpio_init_callback_enter; 963 id = 0x75; 964 fields := struct { 965 uint32_t callback; 966 uint32_t handler; 967 uint32_t pin_mask; 968 }; 969}; 970 971event { 972 name = gpio_init_callback_exit; 973 id = 0x76; 974 fields := struct { 975 uint32_t callback; 976 }; 977}; 978 979event { 980 name = gpio_add_callback_enter; 981 id = 0x77; 982 fields := struct { 983 uint32_t port; 984 uint32_t callback; 985 }; 986}; 987 988event { 989 name = gpio_add_callback_exit; 990 id = 0x78; 991 fields := struct { 992 uint32_t port; 993 uint32_t ret; 994 }; 995}; 996 997event { 998 name = gpio_remove_callback_enter; 999 id = 0x79; 1000 fields := struct { 1001 uint32_t port; 1002 uint32_t callback; 1003 }; 1004}; 1005 1006event { 1007 name = gpio_remove_callback_exit; 1008 id = 0x7A; 1009 fields := struct { 1010 uint32_t port; 1011 uint32_t ret; 1012 }; 1013}; 1014 1015event { 1016 name = gpio_get_pending_int_enter; 1017 id = 0x7B; 1018 fields := struct { 1019 uint32_t dev; 1020 }; 1021}; 1022 1023event { 1024 name = gpio_get_pending_int_exit; 1025 id = 0x7C; 1026 fields := struct { 1027 uint32_t dev; 1028 uint32_t ret; 1029 }; 1030}; 1031 1032event { 1033 name = gpio_fire_callbacks_enter; 1034 id = 0x7D; 1035 fields := struct { 1036 uint32_t list; 1037 uint32_t port; 1038 uint32_t pins; 1039 }; 1040}; 1041 1042event { 1043 name = gpio_fire_callback; 1044 id = 0x7E; 1045 fields := struct { 1046 uint32_t port; 1047 uint32_t cb; 1048 }; 1049}; 1050