Merge branch 'failpanda'
Conflicts: src/core/comm/DatabaseCampaignMessage.proto.in src/core/cpn/CMakeLists.txt src/core/cpn/DatabaseCampaign.cc src/core/sal/ConcreteCPU.hpp src/core/sal/SALConfig.hpp src/core/util/CMakeLists.txt Change-Id: Id86b93d0e3ea4d9963fcc88605eec0603575ec83
This commit is contained in:
@ -7,15 +7,31 @@ set(SRCS
|
||||
## Setup desired protobuf descriptions HERE ##
|
||||
set(PROTOS
|
||||
FailControlMessage.proto
|
||||
DatabaseCampaignMessage.proto
|
||||
${CMAKE_CURRENT_BINARY_DIR}/DatabaseCampaignMessage.proto
|
||||
TracePlugin.proto
|
||||
)
|
||||
|
||||
## Set concrete implementation of InjectionPointMessage
|
||||
# TODO: Define separate symbol, so it can also be used in other build types
|
||||
if(CONFIG_INJECTIONPOINT_HOPS)
|
||||
set(PROTOS ${PROTOS} InjectionPointHopsMessage.proto)
|
||||
set(CONCRETE_INJECTION_POINT InjectionPointHopsMessage.proto)
|
||||
else(CONFIG_INJECTIONPOINT_HOPS)
|
||||
set(PROTOS ${PROTOS} InjectionPointStepsMessage.proto)
|
||||
set(CONCRETE_INJECTION_POINT InjectionPointStepsMessage.proto)
|
||||
endif(CONFIG_INJECTIONPOINT_HOPS)
|
||||
|
||||
# Configure concrete protobuf message to be included by campaign message
|
||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/DatabaseCampaignMessage.proto.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/DatabaseCampaignMessage.proto)
|
||||
|
||||
#### PROTOBUFS ####
|
||||
find_package(Protobuf REQUIRED)
|
||||
include_directories(${PROTOBUF_INCLUDE_DIRS})
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
# Let protobuf compiler find defined file (DatabaseCampaignMessage) in binary tree
|
||||
set(PROTOBUF_IMPORT_DIRS ${PROTOBUF_IMPORT_DIRS} ${CMAKE_CURRENT_BINARY_DIR})
|
||||
PROTOBUF_GENERATE_CPP(PROTO_SRCS PROTO_HDRS ${PROTOS})
|
||||
|
||||
add_library(fail-comm ${SRCS} ${PROTO_SRCS} ${PROTO_HDRS})
|
||||
|
||||
@ -4,14 +4,21 @@ extend google.protobuf.FieldOptions {
|
||||
optional bool sql_ignore = 32383 [ default = false];
|
||||
}
|
||||
|
||||
import "@CONCRETE_INJECTION_POINT@";
|
||||
|
||||
message DatabaseCampaignMessage {
|
||||
required uint32 pilot_id = 1 [(sql_primary_key) = true];
|
||||
required uint32 variant_id = 2 [(sql_ignore) = true];
|
||||
required uint32 fspmethod_id = 3 [(sql_ignore) = true];
|
||||
|
||||
// ToDo: injection_instr can be deleted if all experiments switched to
|
||||
// using generic InjectionPointMessage
|
||||
required uint32 injection_instr = 4 [(sql_ignore) = true];
|
||||
optional uint32 injection_instr_absolute = 5 [(sql_ignore) = true];
|
||||
required uint32 data_address = 6 [(sql_ignore) = true];
|
||||
required uint32 data_width = 7 [(sql_ignore) = true];
|
||||
required string variant = 8 [(sql_ignore) = true];
|
||||
required string benchmark = 9 [(sql_ignore) = true];
|
||||
}
|
||||
|
||||
required InjectionPointMessage injection_point = 10 [(sql_ignore) = true];
|
||||
}
|
||||
28
src/core/comm/InjectionPointHopsMessage.proto
Normal file
28
src/core/comm/InjectionPointHopsMessage.proto
Normal file
@ -0,0 +1,28 @@
|
||||
message InjectionPointMessage {
|
||||
// Costs of the hop chain on the PandaBoard
|
||||
// ToDo: Could be eliminated, but it is nice for evaluation
|
||||
optional uint32 costs = 3;
|
||||
|
||||
// If checkpoint must be used for this hop chain, id is set properly
|
||||
optional uint32 checkpoint_id = 1;
|
||||
|
||||
// If we need to know the target dynamic instruction offset,
|
||||
// here it is
|
||||
optional uint32 target_trace_position = 4;
|
||||
|
||||
|
||||
// Repeated groups can't be defined as non-empty, so a manual
|
||||
// non-empty check is required at usage
|
||||
|
||||
// As we assume hops to always watch addresses of length 1, we
|
||||
// don't encode the length in here
|
||||
repeated group Hops = 2 {
|
||||
required uint64 address = 1;
|
||||
enum AccessType {
|
||||
EXECUTE = 1;
|
||||
READ = 2;
|
||||
WRITE = 3;
|
||||
}
|
||||
required AccessType accesstype = 2;
|
||||
}
|
||||
}
|
||||
3
src/core/comm/InjectionPointStepsMessage.proto
Normal file
3
src/core/comm/InjectionPointStepsMessage.proto
Normal file
@ -0,0 +1,3 @@
|
||||
message InjectionPointMessage {
|
||||
required uint32 injection_instr = 1;
|
||||
}
|
||||
Reference in New Issue
Block a user