1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208
|
/*
* This file is part of the Score-P software (http://www.score-p.org)
*
* Copyright (c) 2013,
* Technische Universitaet Dresden, Germany
*
* This software may be modified and distributed under the terms of
* a BSD-style license. See the COPYING file in the package base
* directory for details.
*/
#ifndef OTF2_GLOBAL_SNAP_READER_CALLBACKS_H
#define OTF2_GLOBAL_SNAP_READER_CALLBACKS_H
/**
* @file
* @source templates/OTF2_GlobalSnapReaderCallbacks.tmpl.h
*
* @brief This defines the callbacks for the global snap reader.
*/
#include <stdint.h>
#include <otf2/OTF2_ErrorCodes.h>
#include <otf2/OTF2_GeneralDefinitions.h>
#include <otf2/OTF2_AttributeList.h>
#include <otf2/OTF2_Events.h>
#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */
/** @brief Opaque struct which holds all snap record callbacks.
*
* @since Version 1.2
*/
typedef struct OTF2_GlobalSnapReaderCallbacks_struct OTF2_GlobalSnapReaderCallbacks;
/** @brief Allocates a new struct for the snap callbacks.
*
* @since Version 1.2
*
* @return A newly allocated struct of type @eref{OTF2_GlobalSnapReaderCallbacks}.
*/
OTF2_GlobalSnapReaderCallbacks*
OTF2_GlobalSnapReaderCallbacks_New( void );
/** @brief Deallocates a struct for the global snap callbacks.
*
* @param globalSnapReaderCallbacks Handle to a struct previously allocated
* with @eref{OTF2_GlobalSnapReaderCallbacks_New}.
* @since Version 1.2
*/
void
OTF2_GlobalSnapReaderCallbacks_Delete( OTF2_GlobalSnapReaderCallbacks* globalSnapReaderCallbacks );
/** @brief Clears a struct for the global snap callbacks.
*
* @param globalSnapReaderCallbacks Handle to a struct previously allocated
* with @eref{OTF2_GlobalSnapReaderCallbacks_New}.
* @since Version 1.2
*/
void
OTF2_GlobalSnapReaderCallbacks_Clear( OTF2_GlobalSnapReaderCallbacks* globalSnapReaderCallbacks );
/** @brief Callback for an unknown snap record.
*
* @param locationID The location where this snap happened.
* @param snapTime The time of this snapshot.
* @param userData User data as set by
* @eref{OTF2_Reader_RegisterGlobalSnapCallbacks} or
* @eref{OTF2_GlobalSnapReader_SetCallbacks}.
* @param attributeList Additional attributes for this snap.
*
* @since Version 1.2
*
* @return @eref{OTF2_CALLBACK_SUCCESS} or @eref{OTF2_CALLBACK_INTERRUPT}.
*/
typedef OTF2_CallbackCode
( * OTF2_GlobalSnapReaderCallback_Unknown )( OTF2_LocationRef locationID,
OTF2_TimeStamp snapTime,
void* userData,
OTF2_AttributeList* attributeList );
/** @brief Registers the callback for unknown snaps.
*
* @param globalSnapReaderCallbacks Struct for all callbacks.
* @param unknownCallback Function which should be called for all
* unknown snaps.
* @since Version 1.2
*
* @retbegin
* @retcode{OTF2_SUCCESS, if successful}
* @retcode{OTF2_ERROR_INVALID_ARGUMENT,
* for an invalid @p defReaderCallbacks argument}
* @retend
*/
OTF2_ErrorCode
OTF2_GlobalSnapReaderCallbacks_SetUnknownCallback(
OTF2_GlobalSnapReaderCallbacks* globalSnapReaderCallbacks,
OTF2_GlobalSnapReaderCallback_Unknown unknownCallback );
/** @brief Callback for the SnapshotStart snap record.
*
* This record marks the start of a snapshot.
*
* A snapshot consists of a timestamp and a set of snapshot records. All
* these snapshot records have the same snapshot time. A snapshot
* starts with one @eref{SnapshotStart} record and closes with one
* @eref{SnapshotEnd} record. All snapshot records inbetween are
* ordered by the @p origEventTime, which are also less than the
* snapshot timestamp. Ie. The timestamp of the next event read from
* the event stream is greater or equal to the snapshot time.
*
* @param locationID The location where this snap happened.
* @param time The time of this snapshot.
* @param userData User data as set by
* @eref{OTF2_Reader_RegisterGlobalSnapCallbacks} or
* @eref{OTF2_GlobalSnapReader_SetCallbacks}.
* @param attributeList Additional attributes for this snap.
* @param numberOfRecords Number of snapshot event records in this snapshot.
* Excluding the @eref{SnapshotEnd} record.
*
* @since Version 1.2
*
* @return @eref{OTF2_CALLBACK_SUCCESS} or @eref{OTF2_CALLBACK_INTERRUPT}.
*/
typedef OTF2_CallbackCode
( * OTF2_GlobalSnapReaderCallback_SnapshotStart )( OTF2_LocationRef locationID,
OTF2_TimeStamp snapTime,
void* userData,
OTF2_AttributeList* attributeList,
uint64_t numberOfRecords );
/** @brief Registers the callback for the SnapshotStart snap.
*
* @param globalSnapReaderCallbacks Struct for all callbacks.
* @param snapshotStartCallback Function which should be called for all
* @eref{SnapshotStart} definitions.
*
* @since Version 1.2
*
* @retbegin
* @retcode{OTF2_SUCCESS, if successful}
* @retcode{OTF2_ERROR_INVALID_ARGUMENT,
* for an invalid @p defReaderCallbacks argument}
* @retend
*/
OTF2_ErrorCode
OTF2_GlobalSnapReaderCallbacks_SetSnapshotStartCallback(
OTF2_GlobalSnapReaderCallbacks* globalSnapReaderCallbacks,
OTF2_GlobalSnapReaderCallback_SnapshotStart snapshotStartCallback );
/** @brief Callback for the SnapshotEnd snap record.
*
* This record marks the end of a snapshot. It contains the position to
* continue reading in the event trace for this location. Use
* @eref{OTF2_EvtReader_Seek} with @p contReadPos as the position.
*
* @param locationID The location where this snap happened.
* @param time The time of this snapshot.
* @param userData User data as set by
* @eref{OTF2_Reader_RegisterGlobalSnapCallbacks} or
* @eref{OTF2_GlobalSnapReader_SetCallbacks}.
* @param attributeList Additional attributes for this snap.
* @param contReadPos Position to continue reading in the event trace.
*
* @since Version 1.2
*
* @return @eref{OTF2_CALLBACK_SUCCESS} or @eref{OTF2_CALLBACK_INTERRUPT}.
*/
typedef OTF2_CallbackCode
( * OTF2_GlobalSnapReaderCallback_SnapshotEnd )( OTF2_LocationRef locationID,
OTF2_TimeStamp snapTime,
void* userData,
OTF2_AttributeList* attributeList,
uint64_t contReadPos );
/** @brief Registers the callback for the SnapshotEnd snap.
*
* @param globalSnapReaderCallbacks Struct for all callbacks.
* @param snapshotEndCallback Function which should be called for all
* @eref{SnapshotEnd} definitions.
*
* @since Version 1.2
*
* @retbegin
* @retcode{OTF2_SUCCESS, if successful}
* @retcode{OTF2_ERROR_INVALID_ARGUMENT,
* for an invalid @p defReaderCallbacks argument}
* @retend
*/
OTF2_ErrorCode
OTF2_GlobalSnapReaderCallbacks_SetSnapshotEndCallback(
OTF2_GlobalSnapReaderCallbacks* globalSnapReaderCallbacks,
OTF2_GlobalSnapReaderCallback_SnapshotEnd snapshotEndCallback );
/** @brief Callback for the MeasurementOnOff snap record.
*
* The last occurrence of a @eref{MeasurementOnOff} event of this
* location, if any.
*
* @param locationID The location where this snap happened.
* @param time The time of this snapshot.
* @param userData User data as set by
* @eref{OTF2_Reader_RegisterGlobalSnapCallbacks} or
* @eref{OTF2_GlobalSnapReader_SetCallbacks}.
* @param attributeList Additional attributes for this snap.
* @param origEventTime The original time this event happened.
* @param measurementMode Is the measurement turned on
* (@eref{OTF2_MEASUREMENT_ON}) or off
* (@eref{OTF2_MEASUREMENT_OFF})?
*
* @since Version 1.2
*
* @return @eref{OTF2_CALLBACK_SUCCESS} or @eref{OTF2_CALLBACK_INTERRUPT}.
*/
typedef OTF2_CallbackCode
( * OTF2_GlobalSnapReaderCallback_MeasurementOnOff )( OTF2_LocationRef locationID,
OTF2_TimeStamp snapTime,
void* userData,
OTF2_AttributeList* attributeList,
OTF2_TimeStamp origEventTime,
OTF2_MeasurementMode measurementMode );
/** @brief Registers the callback for the MeasurementOnOff snap.
*
* @param globalSnapReaderCallbacks Struct for all callbacks.
* @param measurementOnOffCallback Function which should be called for all
* @eref{MeasurementOnOff} definitions.
*
* @since Version 1.2
*
* @retbegin
* @retcode{OTF2_SUCCESS, if successful}
* @retcode{OTF2_ERROR_INVALID_ARGUMENT,
* for an invalid @p defReaderCallbacks argument}
* @retend
*/
OTF2_ErrorCode
OTF2_GlobalSnapReaderCallbacks_SetMeasurementOnOffCallback(
OTF2_GlobalSnapReaderCallbacks* globalSnapReaderCallbacks,
OTF2_GlobalSnapReaderCallback_MeasurementOnOff measurementOnOffCallback );
/** @brief Callback for the Enter snap record.
*
* This record exists for each @eref{Enter} event where the corresponding
* @eref{Leave} event did not occur before the snapshot.
*
* @param locationID The location where this snap happened.
* @param time The time of this snapshot.
* @param userData User data as set by
* @eref{OTF2_Reader_RegisterGlobalSnapCallbacks} or
* @eref{OTF2_GlobalSnapReader_SetCallbacks}.
* @param attributeList Additional attributes for this snap.
* @param origEventTime The original time this event happened.
* @param region Needs to be defined in a definition record References a
* @eref{Region} definition and will be mapped to the
* global definition if a mapping table of type
* @eref{OTF2_MAPPING_REGION} is available.
*
* @since Version 1.2
*
* @return @eref{OTF2_CALLBACK_SUCCESS} or @eref{OTF2_CALLBACK_INTERRUPT}.
*/
typedef OTF2_CallbackCode
( * OTF2_GlobalSnapReaderCallback_Enter )( OTF2_LocationRef locationID,
OTF2_TimeStamp snapTime,
void* userData,
OTF2_AttributeList* attributeList,
OTF2_TimeStamp origEventTime,
OTF2_RegionRef region );
/** @brief Registers the callback for the Enter snap.
*
* @param globalSnapReaderCallbacks Struct for all callbacks.
* @param enterCallback Function which should be called for all
* @eref{Enter} definitions.
*
* @since Version 1.2
*
* @retbegin
* @retcode{OTF2_SUCCESS, if successful}
* @retcode{OTF2_ERROR_INVALID_ARGUMENT,
* for an invalid @p defReaderCallbacks argument}
* @retend
*/
OTF2_ErrorCode
OTF2_GlobalSnapReaderCallbacks_SetEnterCallback(
OTF2_GlobalSnapReaderCallbacks* globalSnapReaderCallbacks,
OTF2_GlobalSnapReaderCallback_Enter enterCallback );
/** @brief Callback for the MpiSend snap record.
*
* This record exists for each @eref{MpiSend} event where the matching
* receive message event did not occur on the remote location before
* the snapshot. This could either be a @eref{MpiRecv} or a
* @eref{MpiIrecv} event. Note that it may so, that a previous
* @eref{MpiIsend} with the same envelope than this one is neither
* completed not canceled yet, thus the matching receive may already
* occurred, but the matching couldn't be done yet.
*
* @param locationID The location where this snap happened.
* @param time The time of this snapshot.
* @param userData User data as set by
* @eref{OTF2_Reader_RegisterGlobalSnapCallbacks} or
* @eref{OTF2_GlobalSnapReader_SetCallbacks}.
* @param attributeList Additional attributes for this snap.
* @param origEventTime The original time this event happened.
* @param receiver MPI rank of receiver in @p communicator.
* @param communicator Communicator ID. References a @eref{Comm}, or a
* @eref{InterComm} definition and will be mapped to
* the global definition if a mapping table of type
* @eref{OTF2_MAPPING_COMM} is available.
* @param msgTag Message tag
* @param msgLength Message length
*
* @since Version 1.2
*
* @return @eref{OTF2_CALLBACK_SUCCESS} or @eref{OTF2_CALLBACK_INTERRUPT}.
*/
typedef OTF2_CallbackCode
( * OTF2_GlobalSnapReaderCallback_MpiSend )( OTF2_LocationRef locationID,
OTF2_TimeStamp snapTime,
void* userData,
OTF2_AttributeList* attributeList,
OTF2_TimeStamp origEventTime,
uint32_t receiver,
OTF2_CommRef communicator,
uint32_t msgTag,
uint64_t msgLength );
/** @brief Registers the callback for the MpiSend snap.
*
* @param globalSnapReaderCallbacks Struct for all callbacks.
* @param mpiSendCallback Function which should be called for all
* @eref{MpiSend} definitions.
*
* @since Version 1.2
*
* @retbegin
* @retcode{OTF2_SUCCESS, if successful}
* @retcode{OTF2_ERROR_INVALID_ARGUMENT,
* for an invalid @p defReaderCallbacks argument}
* @retend
*/
OTF2_ErrorCode
OTF2_GlobalSnapReaderCallbacks_SetMpiSendCallback(
OTF2_GlobalSnapReaderCallbacks* globalSnapReaderCallbacks,
OTF2_GlobalSnapReaderCallback_MpiSend mpiSendCallback );
/** @brief Callback for the MpiIsend snap record.
*
* This record exists for each @eref{MpiIsend} event where a
* corresponding @eref{MpiIsendComplete} or
* @eref{MpiRequestCancelled} event did not occur on this location
* before the snapshot. Or the corresponding @eref{MpiIsendComplete}
* did occurred (the @eref{MpiIsendCompleteSnap} record exists in the
* snapshot) but the matching receive message event did not occur on
* the remote location before the snapshot. (This could either be
* an@eref{MpiRecv} or a @eref{MpiIrecv} event.)
*
* @param locationID The location where this snap happened.
* @param time The time of this snapshot.
* @param userData User data as set by
* @eref{OTF2_Reader_RegisterGlobalSnapCallbacks} or
* @eref{OTF2_GlobalSnapReader_SetCallbacks}.
* @param attributeList Additional attributes for this snap.
* @param origEventTime The original time this event happened.
* @param receiver MPI rank of receiver in @p communicator.
* @param communicator Communicator ID. References a @eref{Comm}, or a
* @eref{InterComm} definition and will be mapped to
* the global definition if a mapping table of type
* @eref{OTF2_MAPPING_COMM} is available.
* @param msgTag Message tag
* @param msgLength Message length
* @param requestID ID of the related request
*
* @since Version 1.2
*
* @return @eref{OTF2_CALLBACK_SUCCESS} or @eref{OTF2_CALLBACK_INTERRUPT}.
*/
typedef OTF2_CallbackCode
( * OTF2_GlobalSnapReaderCallback_MpiIsend )( OTF2_LocationRef locationID,
OTF2_TimeStamp snapTime,
void* userData,
OTF2_AttributeList* attributeList,
OTF2_TimeStamp origEventTime,
uint32_t receiver,
OTF2_CommRef communicator,
uint32_t msgTag,
uint64_t msgLength,
uint64_t requestID );
/** @brief Registers the callback for the MpiIsend snap.
*
* @param globalSnapReaderCallbacks Struct for all callbacks.
* @param mpiIsendCallback Function which should be called for all
* @eref{MpiIsend} definitions.
*
* @since Version 1.2
*
* @retbegin
* @retcode{OTF2_SUCCESS, if successful}
* @retcode{OTF2_ERROR_INVALID_ARGUMENT,
* for an invalid @p defReaderCallbacks argument}
* @retend
*/
OTF2_ErrorCode
OTF2_GlobalSnapReaderCallbacks_SetMpiIsendCallback(
OTF2_GlobalSnapReaderCallbacks* globalSnapReaderCallbacks,
OTF2_GlobalSnapReaderCallback_MpiIsend mpiIsendCallback );
/** @brief Callback for the MpiIsendComplete snap record.
*
* This record exists for each @eref{MpiIsend} event where the
* corresponding @eref{MpiIsendComplete} event occurred, but where
* the matching receive message event did not occur on the remote
* location before the snapshot. (This could either be a
* @eref{MpiRecv} or a @eref{MpiIrecv} event.) .
*
* @param locationID The location where this snap happened.
* @param time The time of this snapshot.
* @param userData User data as set by
* @eref{OTF2_Reader_RegisterGlobalSnapCallbacks} or
* @eref{OTF2_GlobalSnapReader_SetCallbacks}.
* @param attributeList Additional attributes for this snap.
* @param origEventTime The original time this event happened.
* @param requestID ID of the related request
*
* @since Version 1.2
*
* @return @eref{OTF2_CALLBACK_SUCCESS} or @eref{OTF2_CALLBACK_INTERRUPT}.
*/
typedef OTF2_CallbackCode
( * OTF2_GlobalSnapReaderCallback_MpiIsendComplete )( OTF2_LocationRef locationID,
OTF2_TimeStamp snapTime,
void* userData,
OTF2_AttributeList* attributeList,
OTF2_TimeStamp origEventTime,
uint64_t requestID );
/** @brief Registers the callback for the MpiIsendComplete snap.
*
* @param globalSnapReaderCallbacks Struct for all callbacks.
* @param mpiIsendCompleteCallback Function which should be called for all
* @eref{MpiIsendComplete} definitions.
*
* @since Version 1.2
*
* @retbegin
* @retcode{OTF2_SUCCESS, if successful}
* @retcode{OTF2_ERROR_INVALID_ARGUMENT,
* for an invalid @p defReaderCallbacks argument}
* @retend
*/
OTF2_ErrorCode
OTF2_GlobalSnapReaderCallbacks_SetMpiIsendCompleteCallback(
OTF2_GlobalSnapReaderCallbacks* globalSnapReaderCallbacks,
OTF2_GlobalSnapReaderCallback_MpiIsendComplete mpiIsendCompleteCallback );
/** @brief Callback for the MpiRecv snap record.
*
* This record exists for each @eref{MpiRecv} event where the matching
* send message event did not occur on the remote location before the
* snapshot. This could either be a @eref{MpiSend} or a
* @eref{MpiIsendComplete} event. Or a @eref{MpiIrecvRequest}
* occurred before this event but the corresponding @eref{MpiIrecv}
* event did not occurred before this snapshot. In this case the
* message matching couldn't performed yet, because the envelope of
* the ongoing @eref{MpiIrecvRequest} is not yet known.
*
* @param locationID The location where this snap happened.
* @param time The time of this snapshot.
* @param userData User data as set by
* @eref{OTF2_Reader_RegisterGlobalSnapCallbacks} or
* @eref{OTF2_GlobalSnapReader_SetCallbacks}.
* @param attributeList Additional attributes for this snap.
* @param origEventTime The original time this event happened.
* @param sender MPI rank of sender in @p communicator.
* @param communicator Communicator ID. References a @eref{Comm}, or a
* @eref{InterComm} definition and will be mapped to
* the global definition if a mapping table of type
* @eref{OTF2_MAPPING_COMM} is available.
* @param msgTag Message tag
* @param msgLength Message length
*
* @since Version 1.2
*
* @return @eref{OTF2_CALLBACK_SUCCESS} or @eref{OTF2_CALLBACK_INTERRUPT}.
*/
typedef OTF2_CallbackCode
( * OTF2_GlobalSnapReaderCallback_MpiRecv )( OTF2_LocationRef locationID,
OTF2_TimeStamp snapTime,
void* userData,
OTF2_AttributeList* attributeList,
OTF2_TimeStamp origEventTime,
uint32_t sender,
OTF2_CommRef communicator,
uint32_t msgTag,
uint64_t msgLength );
/** @brief Registers the callback for the MpiRecv snap.
*
* @param globalSnapReaderCallbacks Struct for all callbacks.
* @param mpiRecvCallback Function which should be called for all
* @eref{MpiRecv} definitions.
*
* @since Version 1.2
*
* @retbegin
* @retcode{OTF2_SUCCESS, if successful}
* @retcode{OTF2_ERROR_INVALID_ARGUMENT,
* for an invalid @p defReaderCallbacks argument}
* @retend
*/
OTF2_ErrorCode
OTF2_GlobalSnapReaderCallbacks_SetMpiRecvCallback(
OTF2_GlobalSnapReaderCallbacks* globalSnapReaderCallbacks,
OTF2_GlobalSnapReaderCallback_MpiRecv mpiRecvCallback );
/** @brief Callback for the MpiIrecvRequest snap record.
*
* This record exists for each @eref{MpiIrecvRequest} event where an
* corresponding @eref{MpiIrecv} or @eref{MpiRequestCancelled} event
* did not occur on this location before the snapshot. Or the
* corresponding @eref{MpiIrecv} did occurred (the
* @eref{MpiIrecvSnap} record exists in the snapshot) but the
* matching receive message event did not occur on the remote
* location before the snapshot. This could either be an
* @eref{MpiRecv} or a @eref{MpiIrecv} event.
*
* @param locationID The location where this snap happened.
* @param time The time of this snapshot.
* @param userData User data as set by
* @eref{OTF2_Reader_RegisterGlobalSnapCallbacks} or
* @eref{OTF2_GlobalSnapReader_SetCallbacks}.
* @param attributeList Additional attributes for this snap.
* @param origEventTime The original time this event happened.
* @param requestID ID of the requested receive
*
* @since Version 1.2
*
* @return @eref{OTF2_CALLBACK_SUCCESS} or @eref{OTF2_CALLBACK_INTERRUPT}.
*/
typedef OTF2_CallbackCode
( * OTF2_GlobalSnapReaderCallback_MpiIrecvRequest )( OTF2_LocationRef locationID,
OTF2_TimeStamp snapTime,
void* userData,
OTF2_AttributeList* attributeList,
OTF2_TimeStamp origEventTime,
uint64_t requestID );
/** @brief Registers the callback for the MpiIrecvRequest snap.
*
* @param globalSnapReaderCallbacks Struct for all callbacks.
* @param mpiIrecvRequestCallback Function which should be called for all
* @eref{MpiIrecvRequest} definitions.
*
* @since Version 1.2
*
* @retbegin
* @retcode{OTF2_SUCCESS, if successful}
* @retcode{OTF2_ERROR_INVALID_ARGUMENT,
* for an invalid @p defReaderCallbacks argument}
* @retend
*/
OTF2_ErrorCode
OTF2_GlobalSnapReaderCallbacks_SetMpiIrecvRequestCallback(
OTF2_GlobalSnapReaderCallbacks* globalSnapReaderCallbacks,
OTF2_GlobalSnapReaderCallback_MpiIrecvRequest mpiIrecvRequestCallback );
/** @brief Callback for the MpiIrecv snap record.
*
* This record exists for each @eref{MpiIrecv} event where the matching
* send message event did not occur on the remote location before the
* snapshot. This could either be a @eref{MpiSend} or a
* @eref{MpiIsendComplete} event. Or a @eref{MpiIrecvRequest}
* occurred before this event but the corresponding @eref{MpiIrecv}
* event did not occurred before this snapshot. In this case the
* message matching couldn't performed yet, because the envelope of
* the ongoing @eref{MpiIrecvRequest} is not yet known.
*
* @param locationID The location where this snap happened.
* @param time The time of this snapshot.
* @param userData User data as set by
* @eref{OTF2_Reader_RegisterGlobalSnapCallbacks} or
* @eref{OTF2_GlobalSnapReader_SetCallbacks}.
* @param attributeList Additional attributes for this snap.
* @param origEventTime The original time this event happened.
* @param sender MPI rank of sender in @p communicator.
* @param communicator Communicator ID. References a @eref{Comm}, or a
* @eref{InterComm} definition and will be mapped to
* the global definition if a mapping table of type
* @eref{OTF2_MAPPING_COMM} is available.
* @param msgTag Message tag
* @param msgLength Message length
* @param requestID ID of the related request
*
* @since Version 1.2
*
* @return @eref{OTF2_CALLBACK_SUCCESS} or @eref{OTF2_CALLBACK_INTERRUPT}.
*/
typedef OTF2_CallbackCode
( * OTF2_GlobalSnapReaderCallback_MpiIrecv )( OTF2_LocationRef locationID,
OTF2_TimeStamp snapTime,
void* userData,
OTF2_AttributeList* attributeList,
OTF2_TimeStamp origEventTime,
uint32_t sender,
OTF2_CommRef communicator,
uint32_t msgTag,
uint64_t msgLength,
uint64_t requestID );
/** @brief Registers the callback for the MpiIrecv snap.
*
* @param globalSnapReaderCallbacks Struct for all callbacks.
* @param mpiIrecvCallback Function which should be called for all
* @eref{MpiIrecv} definitions.
*
* @since Version 1.2
*
* @retbegin
* @retcode{OTF2_SUCCESS, if successful}
* @retcode{OTF2_ERROR_INVALID_ARGUMENT,
* for an invalid @p defReaderCallbacks argument}
* @retend
*/
OTF2_ErrorCode
OTF2_GlobalSnapReaderCallbacks_SetMpiIrecvCallback(
OTF2_GlobalSnapReaderCallbacks* globalSnapReaderCallbacks,
OTF2_GlobalSnapReaderCallback_MpiIrecv mpiIrecvCallback );
/** @brief Callback for the MpiCollectiveBegin snap record.
*
* Indicates that this location started a collective operation but not
* all of the participating locations completed the operation yet,
* including this location.
*
* @param locationID The location where this snap happened.
* @param time The time of this snapshot.
* @param userData User data as set by
* @eref{OTF2_Reader_RegisterGlobalSnapCallbacks} or
* @eref{OTF2_GlobalSnapReader_SetCallbacks}.
* @param attributeList Additional attributes for this snap.
* @param origEventTime The original time this event happened.
*
* @since Version 1.2
*
* @return @eref{OTF2_CALLBACK_SUCCESS} or @eref{OTF2_CALLBACK_INTERRUPT}.
*/
typedef OTF2_CallbackCode
( * OTF2_GlobalSnapReaderCallback_MpiCollectiveBegin )( OTF2_LocationRef locationID,
OTF2_TimeStamp snapTime,
void* userData,
OTF2_AttributeList* attributeList,
OTF2_TimeStamp origEventTime );
/** @brief Registers the callback for the MpiCollectiveBegin snap.
*
* @param globalSnapReaderCallbacks Struct for all callbacks.
* @param mpiCollectiveBeginCallback Function which should be called for all
* @eref{MpiCollectiveBegin} definitions.
*
* @since Version 1.2
*
* @retbegin
* @retcode{OTF2_SUCCESS, if successful}
* @retcode{OTF2_ERROR_INVALID_ARGUMENT,
* for an invalid @p defReaderCallbacks argument}
* @retend
*/
OTF2_ErrorCode
OTF2_GlobalSnapReaderCallbacks_SetMpiCollectiveBeginCallback(
OTF2_GlobalSnapReaderCallbacks* globalSnapReaderCallbacks,
OTF2_GlobalSnapReaderCallback_MpiCollectiveBegin mpiCollectiveBeginCallback );
/** @brief Callback for the MpiCollectiveEnd snap record.
*
* Indicates that this location completed a collective operation locally
* but not all of the participating locations completed the operation
* yet. The corresponding @eref{MpiCollectiveBeginSnap} record is
* still in the snapshot though.
*
* @param locationID The location where this snap happened.
* @param time The time of this snapshot.
* @param userData User data as set by
* @eref{OTF2_Reader_RegisterGlobalSnapCallbacks} or
* @eref{OTF2_GlobalSnapReader_SetCallbacks}.
* @param attributeList Additional attributes for this snap.
* @param origEventTime The original time this event happened.
* @param collectiveOp Determines which collective operation it is.
* @param communicator Communicator References a @eref{Comm}, or a
* @eref{InterComm} definition and will be mapped to
* the global definition if a mapping table of type
* @eref{OTF2_MAPPING_COMM} is available.
* @param root Rank of root in @p communicator or any predefined
* constant of @eref{OTF2_CollectiveRoot}.
* @param sizeSent Size of the sent message.
* @param sizeReceived Size of the received message.
*
* @since Version 1.2
*
* @return @eref{OTF2_CALLBACK_SUCCESS} or @eref{OTF2_CALLBACK_INTERRUPT}.
*/
typedef OTF2_CallbackCode
( * OTF2_GlobalSnapReaderCallback_MpiCollectiveEnd )( OTF2_LocationRef locationID,
OTF2_TimeStamp snapTime,
void* userData,
OTF2_AttributeList* attributeList,
OTF2_TimeStamp origEventTime,
OTF2_CollectiveOp collectiveOp,
OTF2_CommRef communicator,
uint32_t root,
uint64_t sizeSent,
uint64_t sizeReceived );
/** @brief Registers the callback for the MpiCollectiveEnd snap.
*
* @param globalSnapReaderCallbacks Struct for all callbacks.
* @param mpiCollectiveEndCallback Function which should be called for all
* @eref{MpiCollectiveEnd} definitions.
*
* @since Version 1.2
*
* @retbegin
* @retcode{OTF2_SUCCESS, if successful}
* @retcode{OTF2_ERROR_INVALID_ARGUMENT,
* for an invalid @p defReaderCallbacks argument}
* @retend
*/
OTF2_ErrorCode
OTF2_GlobalSnapReaderCallbacks_SetMpiCollectiveEndCallback(
OTF2_GlobalSnapReaderCallbacks* globalSnapReaderCallbacks,
OTF2_GlobalSnapReaderCallback_MpiCollectiveEnd mpiCollectiveEndCallback );
/** @brief Callback for the OmpFork snap record.
*
* This record exists for each @eref{OmpFork} event where the
* corresponding @eref{OmpJoin} did not occurred before this
* snapshot.
*
* @param locationID The location where this snap happened.
* @param time The time of this snapshot.
* @param userData User data as set by
* @eref{OTF2_Reader_RegisterGlobalSnapCallbacks}
* or
* @eref{OTF2_GlobalSnapReader_SetCallbacks}.
* @param attributeList Additional attributes for this snap.
* @param origEventTime The original time this event happened.
* @param numberOfRequestedThreads Requested size of the team.
*
* @since Version 1.2
*
* @return @eref{OTF2_CALLBACK_SUCCESS} or @eref{OTF2_CALLBACK_INTERRUPT}.
*/
typedef OTF2_CallbackCode
( * OTF2_GlobalSnapReaderCallback_OmpFork )( OTF2_LocationRef locationID,
OTF2_TimeStamp snapTime,
void* userData,
OTF2_AttributeList* attributeList,
OTF2_TimeStamp origEventTime,
uint32_t numberOfRequestedThreads );
/** @brief Registers the callback for the OmpFork snap.
*
* @param globalSnapReaderCallbacks Struct for all callbacks.
* @param ompForkCallback Function which should be called for all
* @eref{OmpFork} definitions.
*
* @since Version 1.2
*
* @retbegin
* @retcode{OTF2_SUCCESS, if successful}
* @retcode{OTF2_ERROR_INVALID_ARGUMENT,
* for an invalid @p defReaderCallbacks argument}
* @retend
*/
OTF2_ErrorCode
OTF2_GlobalSnapReaderCallbacks_SetOmpForkCallback(
OTF2_GlobalSnapReaderCallbacks* globalSnapReaderCallbacks,
OTF2_GlobalSnapReaderCallback_OmpFork ompForkCallback );
/** @brief Callback for the OmpAcquireLock snap record.
*
* This record exists for each @eref{OmpAcquireLock} event where the
* corresponding @eref{OmpReleaseLock} did not occurred before this
* snapshot yet.
*
* @param locationID The location where this snap happened.
* @param time The time of this snapshot.
* @param userData User data as set by
* @eref{OTF2_Reader_RegisterGlobalSnapCallbacks} or
* @eref{OTF2_GlobalSnapReader_SetCallbacks}.
* @param attributeList Additional attributes for this snap.
* @param origEventTime The original time this event happened.
* @param lockID ID of the lock.
* @param acquisitionOrder A monotonically increasing number to determine the
* order of lock acquisitions (with unsynchronized
* clocks this is otherwise not possible).
* Corresponding acquire-release events have same
* number.
*
* @since Version 1.2
*
* @return @eref{OTF2_CALLBACK_SUCCESS} or @eref{OTF2_CALLBACK_INTERRUPT}.
*/
typedef OTF2_CallbackCode
( * OTF2_GlobalSnapReaderCallback_OmpAcquireLock )( OTF2_LocationRef locationID,
OTF2_TimeStamp snapTime,
void* userData,
OTF2_AttributeList* attributeList,
OTF2_TimeStamp origEventTime,
uint32_t lockID,
uint32_t acquisitionOrder );
/** @brief Registers the callback for the OmpAcquireLock snap.
*
* @param globalSnapReaderCallbacks Struct for all callbacks.
* @param ompAcquireLockCallback Function which should be called for all
* @eref{OmpAcquireLock} definitions.
*
* @since Version 1.2
*
* @retbegin
* @retcode{OTF2_SUCCESS, if successful}
* @retcode{OTF2_ERROR_INVALID_ARGUMENT,
* for an invalid @p defReaderCallbacks argument}
* @retend
*/
OTF2_ErrorCode
OTF2_GlobalSnapReaderCallbacks_SetOmpAcquireLockCallback(
OTF2_GlobalSnapReaderCallbacks* globalSnapReaderCallbacks,
OTF2_GlobalSnapReaderCallback_OmpAcquireLock ompAcquireLockCallback );
/** @brief Callback for the OmpTaskCreate snap record.
*
* This record exists for each @eref{OmpTaskCreate} event where the
* corresponding @eref{OmpTaskComplete} event did not occurred before
* this snapshot. Neither on this location nor on any other location
* in the current thread team.
*
* @param locationID The location where this snap happened.
* @param time The time of this snapshot.
* @param userData User data as set by
* @eref{OTF2_Reader_RegisterGlobalSnapCallbacks} or
* @eref{OTF2_GlobalSnapReader_SetCallbacks}.
* @param attributeList Additional attributes for this snap.
* @param origEventTime The original time this event happened.
* @param taskID Identifier of the newly created task instance.
*
* @since Version 1.2
*
* @return @eref{OTF2_CALLBACK_SUCCESS} or @eref{OTF2_CALLBACK_INTERRUPT}.
*/
typedef OTF2_CallbackCode
( * OTF2_GlobalSnapReaderCallback_OmpTaskCreate )( OTF2_LocationRef locationID,
OTF2_TimeStamp snapTime,
void* userData,
OTF2_AttributeList* attributeList,
OTF2_TimeStamp origEventTime,
uint64_t taskID );
/** @brief Registers the callback for the OmpTaskCreate snap.
*
* @param globalSnapReaderCallbacks Struct for all callbacks.
* @param ompTaskCreateCallback Function which should be called for all
* @eref{OmpTaskCreate} definitions.
*
* @since Version 1.2
*
* @retbegin
* @retcode{OTF2_SUCCESS, if successful}
* @retcode{OTF2_ERROR_INVALID_ARGUMENT,
* for an invalid @p defReaderCallbacks argument}
* @retend
*/
OTF2_ErrorCode
OTF2_GlobalSnapReaderCallbacks_SetOmpTaskCreateCallback(
OTF2_GlobalSnapReaderCallbacks* globalSnapReaderCallbacks,
OTF2_GlobalSnapReaderCallback_OmpTaskCreate ompTaskCreateCallback );
/** @brief Callback for the OmpTaskSwitch snap record.
*
* This record exists for each @eref{OmpTaskSwitch} event where the
* corresponding @eref{OmpTaskComplete} event did not occurred before
* this snapshot. Neither on this location nor on any other location
* in the current thread team.
*
* @param locationID The location where this snap happened.
* @param time The time of this snapshot.
* @param userData User data as set by
* @eref{OTF2_Reader_RegisterGlobalSnapCallbacks} or
* @eref{OTF2_GlobalSnapReader_SetCallbacks}.
* @param attributeList Additional attributes for this snap.
* @param origEventTime The original time this event happened.
* @param taskID Identifier of the now active task instance.
*
* @since Version 1.2
*
* @return @eref{OTF2_CALLBACK_SUCCESS} or @eref{OTF2_CALLBACK_INTERRUPT}.
*/
typedef OTF2_CallbackCode
( * OTF2_GlobalSnapReaderCallback_OmpTaskSwitch )( OTF2_LocationRef locationID,
OTF2_TimeStamp snapTime,
void* userData,
OTF2_AttributeList* attributeList,
OTF2_TimeStamp origEventTime,
uint64_t taskID );
/** @brief Registers the callback for the OmpTaskSwitch snap.
*
* @param globalSnapReaderCallbacks Struct for all callbacks.
* @param ompTaskSwitchCallback Function which should be called for all
* @eref{OmpTaskSwitch} definitions.
*
* @since Version 1.2
*
* @retbegin
* @retcode{OTF2_SUCCESS, if successful}
* @retcode{OTF2_ERROR_INVALID_ARGUMENT,
* for an invalid @p defReaderCallbacks argument}
* @retend
*/
OTF2_ErrorCode
OTF2_GlobalSnapReaderCallbacks_SetOmpTaskSwitchCallback(
OTF2_GlobalSnapReaderCallbacks* globalSnapReaderCallbacks,
OTF2_GlobalSnapReaderCallback_OmpTaskSwitch ompTaskSwitchCallback );
/** @brief Callback for the Metric snap record.
*
* This record exists for each referenced metric class or metric instance
* event this location recorded metrics before and provides the last
* known recorded metric values.
*
* As an exception for metric classes where the metric mode denotes an
* @eref{OTF2_METRIC_VALUE_RELATIVE} mode the value indicates the
* accumulation of all previous metric values recorded.
*
* @param locationID The location where this snap happened.
* @param time The time of this snapshot.
* @param userData User data as set by
* @eref{OTF2_Reader_RegisterGlobalSnapCallbacks} or
* @eref{OTF2_GlobalSnapReader_SetCallbacks}.
* @param attributeList Additional attributes for this snap.
* @param origEventTime The original time this event happened.
* @param metric Could be a metric class or a metric instance.
* References a @eref{MetricClass}, or a
* @eref{MetricInstance} definition and will be
* mapped to the global definition if a mapping table
* of type @eref{OTF2_MAPPING_METRIC} is available.
* @param numberOfMetrics Number of metrics with in the set.
* @param typeIDs List of metric types. These types must match that of
* the corresponding @eref{MetricMember} definitions.
* @param metricValues List of metric values.
*
* @since Version 1.2
*
* @return @eref{OTF2_CALLBACK_SUCCESS} or @eref{OTF2_CALLBACK_INTERRUPT}.
*/
typedef OTF2_CallbackCode
( * OTF2_GlobalSnapReaderCallback_Metric )( OTF2_LocationRef locationID,
OTF2_TimeStamp snapTime,
void* userData,
OTF2_AttributeList* attributeList,
OTF2_TimeStamp origEventTime,
OTF2_MetricRef metric,
uint8_t numberOfMetrics,
const OTF2_Type* typeIDs,
const OTF2_MetricValue* metricValues );
/** @brief Registers the callback for the Metric snap.
*
* @param globalSnapReaderCallbacks Struct for all callbacks.
* @param metricCallback Function which should be called for all
* @eref{Metric} definitions.
*
* @since Version 1.2
*
* @retbegin
* @retcode{OTF2_SUCCESS, if successful}
* @retcode{OTF2_ERROR_INVALID_ARGUMENT,
* for an invalid @p defReaderCallbacks argument}
* @retend
*/
OTF2_ErrorCode
OTF2_GlobalSnapReaderCallbacks_SetMetricCallback(
OTF2_GlobalSnapReaderCallbacks* globalSnapReaderCallbacks,
OTF2_GlobalSnapReaderCallback_Metric metricCallback );
/** @brief Callback for the ParameterString snap record.
*
* This record must be included in the snapshot until the leave event for
* the enter event occurs which has the greatest timestamp less or
* equal the timestamp of this record.
*
* @param locationID The location where this snap happened.
* @param time The time of this snapshot.
* @param userData User data as set by
* @eref{OTF2_Reader_RegisterGlobalSnapCallbacks} or
* @eref{OTF2_GlobalSnapReader_SetCallbacks}.
* @param attributeList Additional attributes for this snap.
* @param origEventTime The original time this event happened.
* @param parameter Parameter ID. References a @eref{Parameter} definition
* and will be mapped to the global definition if a
* mapping table of type @eref{OTF2_MAPPING_PARAMETER}
* is available.
* @param string Value: Handle of a string definition References a
* @eref{String} definition and will be mapped to the
* global definition if a mapping table of type
* @eref{OTF2_MAPPING_STRING} is available.
*
* @since Version 1.2
*
* @return @eref{OTF2_CALLBACK_SUCCESS} or @eref{OTF2_CALLBACK_INTERRUPT}.
*/
typedef OTF2_CallbackCode
( * OTF2_GlobalSnapReaderCallback_ParameterString )( OTF2_LocationRef locationID,
OTF2_TimeStamp snapTime,
void* userData,
OTF2_AttributeList* attributeList,
OTF2_TimeStamp origEventTime,
OTF2_ParameterRef parameter,
OTF2_StringRef string );
/** @brief Registers the callback for the ParameterString snap.
*
* @param globalSnapReaderCallbacks Struct for all callbacks.
* @param parameterStringCallback Function which should be called for all
* @eref{ParameterString} definitions.
*
* @since Version 1.2
*
* @retbegin
* @retcode{OTF2_SUCCESS, if successful}
* @retcode{OTF2_ERROR_INVALID_ARGUMENT,
* for an invalid @p defReaderCallbacks argument}
* @retend
*/
OTF2_ErrorCode
OTF2_GlobalSnapReaderCallbacks_SetParameterStringCallback(
OTF2_GlobalSnapReaderCallbacks* globalSnapReaderCallbacks,
OTF2_GlobalSnapReaderCallback_ParameterString parameterStringCallback );
/** @brief Callback for the ParameterInt snap record.
*
* This record must be included in the snapshot until the leave event for
* the enter event occurs which has the greatest timestamp less or
* equal the timestamp of this record.
*
* @param locationID The location where this snap happened.
* @param time The time of this snapshot.
* @param userData User data as set by
* @eref{OTF2_Reader_RegisterGlobalSnapCallbacks} or
* @eref{OTF2_GlobalSnapReader_SetCallbacks}.
* @param attributeList Additional attributes for this snap.
* @param origEventTime The original time this event happened.
* @param parameter Parameter ID. References a @eref{Parameter} definition
* and will be mapped to the global definition if a
* mapping table of type @eref{OTF2_MAPPING_PARAMETER}
* is available.
* @param value Value of the recorded parameter.
*
* @since Version 1.2
*
* @return @eref{OTF2_CALLBACK_SUCCESS} or @eref{OTF2_CALLBACK_INTERRUPT}.
*/
typedef OTF2_CallbackCode
( * OTF2_GlobalSnapReaderCallback_ParameterInt )( OTF2_LocationRef locationID,
OTF2_TimeStamp snapTime,
void* userData,
OTF2_AttributeList* attributeList,
OTF2_TimeStamp origEventTime,
OTF2_ParameterRef parameter,
int64_t value );
/** @brief Registers the callback for the ParameterInt snap.
*
* @param globalSnapReaderCallbacks Struct for all callbacks.
* @param parameterIntCallback Function which should be called for all
* @eref{ParameterInt} definitions.
*
* @since Version 1.2
*
* @retbegin
* @retcode{OTF2_SUCCESS, if successful}
* @retcode{OTF2_ERROR_INVALID_ARGUMENT,
* for an invalid @p defReaderCallbacks argument}
* @retend
*/
OTF2_ErrorCode
OTF2_GlobalSnapReaderCallbacks_SetParameterIntCallback(
OTF2_GlobalSnapReaderCallbacks* globalSnapReaderCallbacks,
OTF2_GlobalSnapReaderCallback_ParameterInt parameterIntCallback );
/** @brief Callback for the ParameterUnsignedInt snap record.
*
* This record must be included in the snapshot until the leave event for
* the enter event occurs which has the greatest timestamp less or
* equal the timestamp of this record.
*
* @param locationID The location where this snap happened.
* @param time The time of this snapshot.
* @param userData User data as set by
* @eref{OTF2_Reader_RegisterGlobalSnapCallbacks} or
* @eref{OTF2_GlobalSnapReader_SetCallbacks}.
* @param attributeList Additional attributes for this snap.
* @param origEventTime The original time this event happened.
* @param parameter Parameter ID. References a @eref{Parameter} definition
* and will be mapped to the global definition if a
* mapping table of type @eref{OTF2_MAPPING_PARAMETER}
* is available.
* @param value Value of the recorded parameter.
*
* @since Version 1.2
*
* @return @eref{OTF2_CALLBACK_SUCCESS} or @eref{OTF2_CALLBACK_INTERRUPT}.
*/
typedef OTF2_CallbackCode
( * OTF2_GlobalSnapReaderCallback_ParameterUnsignedInt )( OTF2_LocationRef locationID,
OTF2_TimeStamp snapTime,
void* userData,
OTF2_AttributeList* attributeList,
OTF2_TimeStamp origEventTime,
OTF2_ParameterRef parameter,
uint64_t value );
/** @brief Registers the callback for the ParameterUnsignedInt snap.
*
* @param globalSnapReaderCallbacks Struct for all callbacks.
* @param parameterUnsignedIntCallback Function which should be called for all
* @eref{ParameterUnsignedInt}
* definitions.
*
* @since Version 1.2
*
* @retbegin
* @retcode{OTF2_SUCCESS, if successful}
* @retcode{OTF2_ERROR_INVALID_ARGUMENT,
* for an invalid @p defReaderCallbacks argument}
* @retend
*/
OTF2_ErrorCode
OTF2_GlobalSnapReaderCallbacks_SetParameterUnsignedIntCallback(
OTF2_GlobalSnapReaderCallbacks* globalSnapReaderCallbacks,
OTF2_GlobalSnapReaderCallback_ParameterUnsignedInt parameterUnsignedIntCallback );
#ifdef __cplusplus
}
#endif /* __cplusplus */
#endif /* !OTF2_GLOBAL_SNAP_READER_CALLBACKS_H */
|