DatabaseCampaign: abstract campain for interaction with MySQL Database
The DatabaseCampaign interacts with the MySQL tables that are created
by the import-trace and prune-trace tools. It does offer all
unfinished experiment pilots from the database to the
fail-clients. Those clients send back a (by the experiment) defined
protobuf message as a result. The custom protobuf message does have to
need the form:
import "DatabaseCampaignMessage.proto";
message ExperimentMsg {
required DatabaseCampaignMessage fsppilot = 1;
repeated group Result = 2 {
// custom fields
required int32 bitoffset = 1;
optional int32 result = 2;
}
}
The DatabaseCampaignMessage is the pilot identifier from the
database. For each of the repeated result entries a row in a table is
allocated. The structure of this table is constructed (by protobuf
reflection) from the description of the message. Each field in the
Result group becomes a column in the result table. For the given
example it would be:
CREATE TABLE result_ExperimentMessage(
pilot_id INT,
bitoffset INT NOT NULL,
result INT,
PRIMARY_KEY(pilot_id)
)
Change-Id: I28fb5488e739d4098b823b42426c5760331027f8
This commit is contained in:
@ -1,13 +1,5 @@
|
||||
set(PLUGIN_NAME tracing)
|
||||
|
||||
#### PROTOBUFS ####
|
||||
set(MY_PROTOS
|
||||
trace.proto
|
||||
)
|
||||
find_package(Protobuf REQUIRED)
|
||||
include_directories(${PROTOBUF_INCLUDE_DIRS})
|
||||
PROTOBUF_GENERATE_CPP(PROTO_SRCS PROTO_HDRS ${MY_PROTOS})
|
||||
|
||||
set(MY_PLUGIN_SRCS
|
||||
TracingPlugin.cc
|
||||
TracingPlugin.hpp
|
||||
@ -15,5 +7,7 @@ set(MY_PLUGIN_SRCS
|
||||
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||
|
||||
## Build library
|
||||
add_library(fail-${PLUGIN_NAME} ${MY_PLUGIN_SRCS} ${PROTO_SRCS} ${PROTO_HDRS})
|
||||
target_link_libraries(fail-${PLUGIN_NAME} ${PROTOBUF_LIBRARY})
|
||||
add_library(fail-${PLUGIN_NAME} ${MY_PLUGIN_SRCS})
|
||||
add_dependencies(fail-${PLUGIN_NAME} fail-comm)
|
||||
target_link_libraries(fail-${PLUGIN_NAME})
|
||||
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
#include "efw/ExperimentFlow.hpp"
|
||||
#include "config/FailConfig.hpp"
|
||||
|
||||
#include "../plugins/tracing/trace.pb.h"
|
||||
#include "TracePlugin.pb.h"
|
||||
|
||||
// Check if configuration dependencies are satisfied:
|
||||
#if !defined(CONFIG_EVENT_BREAKPOINTS) || !defined(CONFIG_EVENT_MEMREAD) || !defined(CONFIG_EVENT_MEMWRITE)
|
||||
|
||||
@ -1,30 +0,0 @@
|
||||
message Trace_Event_Extended {
|
||||
// data value read/written
|
||||
optional uint64 data = 5;
|
||||
// register contents
|
||||
repeated group Registers = 6 {
|
||||
// register ID
|
||||
required uint32 id = 1;
|
||||
// register value
|
||||
optional uint64 value = 2;
|
||||
// data register points to
|
||||
optional uint32 value_deref = 3;
|
||||
}
|
||||
// selected stack content
|
||||
repeated group Stack = 7 {
|
||||
required uint32 value = 1;
|
||||
}
|
||||
}
|
||||
|
||||
message Trace_Event {
|
||||
required uint64 ip = 1;
|
||||
optional uint64 memaddr = 2;
|
||||
optional uint32 width = 3;
|
||||
enum AccessType {
|
||||
READ = 1;
|
||||
WRITE = 2;
|
||||
}
|
||||
optional AccessType accesstype = 4;
|
||||
|
||||
optional Trace_Event_Extended trace_ext = 5;
|
||||
}
|
||||
Reference in New Issue
Block a user