-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #420 from lf-lang/trace-plugin-property-fix
TracePluginProperty fixes
- Loading branch information
Showing
15 changed files
with
301 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
master | ||
trace-plugin-property-fix |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
add_library(lf-trace-api INTERFACE) | ||
add_library(lf::trace-api ALIAS lf-trace-api) | ||
include(${CMAKE_CURRENT_LIST_DIR}/types/CMakeLists.txt) | ||
target_link_libraries(lf-trace-api INTERFACE lf::trace-api-types) | ||
target_include_directories(lf-trace-api INTERFACE ${CMAKE_CURRENT_LIST_DIR}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
add_library(lf-trace-api-types INTERFACE) | ||
add_library(lf::trace-api-types ALIAS lf-trace-api-types) | ||
target_include_directories(lf-trace-api-types INTERFACE ${CMAKE_CURRENT_LIST_DIR}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,142 @@ | ||
/** | ||
* @file trace-types.h | ||
* @author Peter Donovan <[email protected]> | ||
* @brief Definitions that are needed by both implementors and callers of the | ||
* trace API regardless of whether tracing is enabled at compile time. | ||
* | ||
* @copyright Copyright (c) 2024 | ||
*/ | ||
|
||
#ifndef TRACE_TYPES_H | ||
#define TRACE_TYPES_H | ||
|
||
/** | ||
* Trace event types. If you update this, be sure to update the | ||
* string representation below. Also, create a tracepoint function | ||
* for each event type. | ||
*/ | ||
typedef enum { | ||
reaction_starts, | ||
reaction_ends, | ||
reaction_deadline_missed, | ||
schedule_called, | ||
user_event, | ||
user_value, | ||
worker_wait_starts, | ||
worker_wait_ends, | ||
scheduler_advancing_time_starts, | ||
scheduler_advancing_time_ends, | ||
federated, // Everything below this is for tracing federated interactions. | ||
// Sending messages | ||
send_ACK, | ||
send_FAILED, | ||
send_TIMESTAMP, | ||
send_NET, | ||
send_LTC, | ||
send_STOP_REQ, | ||
send_STOP_REQ_REP, | ||
send_STOP_GRN, | ||
send_FED_ID, | ||
send_PTAG, | ||
send_TAG, | ||
send_REJECT, | ||
send_RESIGN, | ||
send_PORT_ABS, | ||
send_CLOSE_RQ, | ||
send_TAGGED_MSG, | ||
send_P2P_TAGGED_MSG, | ||
send_MSG, | ||
send_P2P_MSG, | ||
send_ADR_AD, | ||
send_ADR_QR, | ||
// Receiving messages | ||
receive_ACK, | ||
receive_FAILED, | ||
receive_TIMESTAMP, | ||
receive_NET, | ||
receive_LTC, | ||
receive_STOP_REQ, | ||
receive_STOP_REQ_REP, | ||
receive_STOP_GRN, | ||
receive_FED_ID, | ||
receive_PTAG, | ||
receive_TAG, | ||
receive_REJECT, | ||
receive_RESIGN, | ||
receive_PORT_ABS, | ||
receive_CLOSE_RQ, | ||
receive_TAGGED_MSG, | ||
receive_P2P_TAGGED_MSG, | ||
receive_MSG, | ||
receive_P2P_MSG, | ||
receive_ADR_AD, | ||
receive_ADR_QR, | ||
receive_UNIDENTIFIED, | ||
NUM_EVENT_TYPES | ||
} trace_event_t; | ||
|
||
/** | ||
* String description of event types. | ||
*/ | ||
static const char* trace_event_names[] = { | ||
"Reaction starts", | ||
"Reaction ends", | ||
"Reaction deadline missed", | ||
"Schedule called", | ||
"User-defined event", | ||
"User-defined valued event", | ||
"Worker wait starts", | ||
"Worker wait ends", | ||
"Scheduler advancing time starts", | ||
"Scheduler advancing time ends", | ||
"Federated marker", | ||
// Sending messages | ||
"Sending ACK", | ||
"Sending FAILED", | ||
"Sending TIMESTAMP", | ||
"Sending NET", | ||
"Sending LTC", | ||
"Sending STOP_REQ", | ||
"Sending STOP_REQ_REP", | ||
"Sending STOP_GRN", | ||
"Sending FED_ID", | ||
"Sending PTAG", | ||
"Sending TAG", | ||
"Sending REJECT", | ||
"Sending RESIGN", | ||
"Sending PORT_ABS", | ||
"Sending CLOSE_RQ", | ||
"Sending TAGGED_MSG", | ||
"Sending P2P_TAGGED_MSG", | ||
"Sending MSG", | ||
"Sending P2P_MSG", | ||
"Sending ADR_AD", | ||
"Sending ADR_QR", | ||
// Receiving messages | ||
"Receiving ACK", | ||
"Receiving FAILED", | ||
"Receiving TIMESTAMP", | ||
"Receiving NET", | ||
"Receiving LTC", | ||
"Receiving STOP_REQ", | ||
"Receiving STOP_REQ_REP", | ||
"Receiving STOP_GRN", | ||
"Receiving FED_ID", | ||
"Receiving PTAG", | ||
"Receiving TAG", | ||
"Receiving REJECT", | ||
"Receiving RESIGN", | ||
"Receiving PORT_ABS", | ||
"Receiving CLOSE_RQ", | ||
"Receiving TAGGED_MSG", | ||
"Receiving P2P_TAGGED_MSG", | ||
"Receiving MSG", | ||
"Receiving P2P_MSG", | ||
"Receiving ADR_AD", | ||
"Receiving ADR_QR", | ||
"Receiving UNIDENTIFIED", | ||
}; | ||
|
||
static inline void _suppress_unused_variable_warning_for_static_variable() { (void)trace_event_names; } | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
cmake_minimum_required(VERSION 3.13) | ||
project(TracepointToRs LANGUAGES C) | ||
add_executable(tracepoint-to-rs ${CMAKE_CURRENT_LIST_DIR}/src/tracepoint_to_rs.c) | ||
set(LF_ROOT ${CMAKE_CURRENT_LIST_DIR}/../../..) | ||
include(${LF_ROOT}/trace/api/CMakeLists.txt) | ||
include(${LF_ROOT}/version/api/CMakeLists.txt) | ||
target_link_libraries(tracepoint-to-rs PUBLIC lf::trace-api) | ||
target_link_libraries(tracepoint-to-rs PUBLIC lf::version-api) | ||
target_link_libraries(tracepoint-to-rs PUBLIC lf::trace-api-types) |
Oops, something went wrong.