Browse Source

Adapted plugin behavior obeying availabiltiy of instrumentation

interface and updated CMake files

Conflicts:
	dbt-core
Eyck Jentzsch 1 year ago
parent
commit
2e26be362a

+ 5
- 2
.cproject View File

@@ -13,7 +13,7 @@
13 13
 				</extensions>
14 14
 			</storageModule>
15 15
 			<storageModule moduleId="cdtBuildSystem" version="4.0.0">
16
-				<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.debug.1751741082" name="Debug" parent="cdt.managedbuild.config.gnu.exe.debug">
16
+				<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.debug.1751741082" name="Debug" optionalBuildProperties="org.eclipse.cdt.docker.launcher.containerbuild.property.volumes=,org.eclipse.cdt.docker.launcher.containerbuild.property.selectedvolumes=" parent="cdt.managedbuild.config.gnu.exe.debug">
17 17
 					<folderInfo id="cdt.managedbuild.config.gnu.exe.debug.1751741082." name="/" resourcePath="">
18 18
 						<toolChain id="cdt.managedbuild.toolchain.gnu.exe.debug.1289745146" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.debug">
19 19
 							<targetPlatform binaryParser="org.eclipse.cdt.core.GNU_ELF;org.eclipse.cdt.core.ELF" id="cdt.managedbuild.target.gnu.platform.exe.debug.1460698591" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.debug"/>
@@ -60,7 +60,7 @@
60 60
 				</extensions>
61 61
 			</storageModule>
62 62
 			<storageModule moduleId="cdtBuildSystem" version="4.0.0">
63
-				<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.release.1745230171" name="Release" parent="cdt.managedbuild.config.gnu.exe.release">
63
+				<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release" cleanCommand="rm -rf" description="" id="cdt.managedbuild.config.gnu.exe.release.1745230171" name="Release" optionalBuildProperties="" parent="cdt.managedbuild.config.gnu.exe.release">
64 64
 					<folderInfo id="cdt.managedbuild.config.gnu.exe.release.1745230171." name="/" resourcePath="">
65 65
 						<toolChain id="cdt.managedbuild.toolchain.gnu.exe.release.2006835092" name="Linux GCC" superClass="cdt.managedbuild.toolchain.gnu.exe.release">
66 66
 							<targetPlatform binaryParser="org.eclipse.cdt.core.GNU_ELF;org.eclipse.cdt.core.ELF" id="cdt.managedbuild.target.gnu.platform.exe.release.1630517313" name="Debug Platform" superClass="cdt.managedbuild.target.gnu.platform.exe.release"/>
@@ -166,6 +166,9 @@
166 166
 	</storageModule>
167 167
 	<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
168 168
 	<storageModule moduleId="refreshScope" versionNumber="2">
169
+		<configuration configurationName="Default">
170
+			<resource resourceType="PROJECT" workspacePath="/DBT-RISE-RISCV"/>
171
+		</configuration>
169 172
 		<configuration configurationName="Debug">
170 173
 			<resource resourceType="PROJECT" workspacePath="/DBT-RISE-RISCV"/>
171 174
 		</configuration>

+ 2
- 1
cmake/Conan.cmake View File

@@ -41,5 +41,6 @@ macro(setup_conan)
41 41
   endif()
42 42
 
43 43
   include(${conanfile_cmake})
44
-  conan_basic_setup(TARGETS)
44
+  #conan_basic_setup(TARGETS)
45
+  conan_basic_setup()
45 46
 endmacro()

+ 0
- 1
conanfile.txt View File

@@ -9,7 +9,6 @@
9 9
 
10 10
 [generators]
11 11
     cmake
12
-    txt
13 12
 
14 13
 [options]
15 14
     Poco:shared=True

+ 2
- 0
riscv/CMakeLists.txt View File

@@ -30,6 +30,8 @@ if(GIT_FOUND)
30 30
     set (VCS_REVISION ${GIT_SHA1})
31 31
 endif()
32 32
 
33
+conan_basic_setup()
34
+
33 35
 # This line finds the boost lib and headers. 
34 36
 set(Boost_NO_BOOST_CMAKE ON) #  Don't do a find_package in config mode before searching for a regular boost install.
35 37
 find_package(Boost COMPONENTS program_options system thread REQUIRED)

+ 3
- 0
riscv/src/plugin/cycle_estimate.cpp View File

@@ -60,6 +60,7 @@ iss::plugin::cycle_estimate::~cycle_estimate() {
60 60
 
61 61
 bool iss::plugin::cycle_estimate::registration(const char* const version, vm_if& vm) {
62 62
 	arch_instr = vm.get_arch()->get_instrumentation_if();
63
+	if(!arch_instr) return false;
63 64
 	const std::string  core_name = arch_instr->core_type_name();
64 65
     Json::Value &val = root[core_name];
65 66
     if(val.isArray()){
@@ -77,9 +78,11 @@ bool iss::plugin::cycle_estimate::registration(const char* const version, vm_if&
77 78
     	}
78 79
     }
79 80
 	return true;
81
+
80 82
 }
81 83
 
82 84
 void iss::plugin::cycle_estimate::callback(instr_info_t instr_info) {
85
+    assert(arch_instr && "No instrumentation interface available but callback executed");
83 86
 	auto entry = delays[instr_info.instr_id];
84 87
 	bool taken = (arch_instr->get_next_pc()-arch_instr->get_pc()) != (entry.size/8);
85 88
 	if(taken && entry.taken > 1 ) // 1 is the default increment per instruction

+ 3
- 1
riscv/src/plugin/instruction_count.cpp View File

@@ -64,7 +64,9 @@ iss::plugin::instruction_count::~instruction_count() {
64 64
 }
65 65
 
66 66
 bool iss::plugin::instruction_count::registration(const char* const version, vm_if& vm) {
67
-	const std::string  core_name = vm.get_arch()->get_instrumentation_if()->core_type_name();
67
+    auto instr_if = vm.get_arch()->get_instrumentation_if();
68
+    if(!instr_if) return false;
69
+	const std::string  core_name = instr_if->core_type_name();
68 70
     Json::Value &val = root[core_name];
69 71
     if(val.isArray()){
70 72
     	delays.reserve(val.size());

+ 1
- 1
sc-components

@@ -1 +1 @@
1
-Subproject commit ac8bd1d2912996c0ec526963f6f6bb862555402f
1
+Subproject commit bab66d1744221fdce7d0634c08c5c21184539d2a