Lines Matching defs:plugin

79     auto plugin = std::make_shared<PluginModule>(pluginPath);
80 CHECK_TRUE(plugin->Load(), false, "%s:load failed!", __func__);
82 if (!plugin->BindFunctions()) {
84 plugin->Unload();
88 if (!plugin->GetInfo(info)) {
90 plugin->Unload();
97 plugin->Unload();
100 PROFILER_LOG_DEBUG(LOG_CORE, "%s:add plugin name = %s", __func__, pluginName.c_str());
102 if (!plugin->Unload()) {
107 return RegisterPlugin(plugin, pluginPath, info);
110 bool PluginManager::RegisterPlugin(const PluginModulePtr& plugin, const std::string& pluginPath,
127 pluginModules_.insert(std::pair<uint32_t, std::shared_ptr<PluginModule>>(response.plugin_id(), plugin));
147 "%s:not find plugin: %s", __func__, pluginPath.c_str());
152 PROFILER_LOG_DEBUG(LOG_CORE, "%s:plugin not exist", __func__);
157 // stop plugin if plugin running
159 PROFILER_LOG_WARN(LOG_CORE, "%s:plugin delete while using, stop plugin", __func__);
163 PROFILER_LOG_WARN(LOG_CORE, "%s:delete schedule task plugin name = %s", __func__, pluginName.c_str());
165 PROFILER_LOG_WARN(LOG_CORE, "%s:delete schedule task plugin name = %s failed!",
171 PROFILER_LOG_WARN(LOG_CORE, "%s:plugin stop failed!", __func__);
175 // Unload plugin if plugin loaded
177 PROFILER_LOG_WARN(LOG_CORE, "%s:plugin delete while using, unload plugin", __func__);
179 PROFILER_LOG_WARN(LOG_CORE, "%s:unload plugin failed!", __func__);
199 PROFILER_LOG_DEBUG(LOG_CORE, "%s:plugin not exist", __func__);
211 CHECK_TRUE(it != pluginIds_.end(), false, "%s:plugin not exist", __func__);
227 PROFILER_LOG_DEBUG(LOG_CORE, "%s:plugin not exist", __func__);
238 PROFILER_LOG_DEBUG(LOG_CORE, "%s:plugin not exist", __func__);
254 PROFILER_LOG_DEBUG(LOG_CORE, "%s:plugin not find", __func__);
270 PROFILER_LOG_DEBUG(LOG_CORE, "%s:plugin not find", __func__);
286 PROFILER_LOG_DEBUG(LOG_CORE, "%s:plugin not find", __func__);
289 auto plugin = pluginModules_[id];
290 auto cfgData = plugin->GetConfigData();
291 if (!plugin->StartSession(reinterpret_cast<const uint8_t*>(cfgData.c_str()), cfgData.size())) {
295 if (plugin->GetSampleMode() == PluginModule::SampleMode::POLLING) {
313 // need update standalone plugin output file name
314 if (plugin->GetStandaloneFileData()) {
316 plugin->GetOutFileName(pluginOutFileName);
332 PROFILER_LOG_DEBUG(LOG_CORE, "%s:plugin not find", __func__);
338 PROFILER_LOG_DEBUG(LOG_CORE, "%s:find plugin name = %s", __func__, it.first.c_str());
364 CHECK_TRUE(pluginModules_.find(id) != pluginModules_.end(), false, "%s:plugin not find", __func__);
365 // notify plugin to report basic data
400 PROFILER_LOG_DEBUG(LOG_CORE, "%s:plugin not find", __func__);
471 PROFILER_LOG_DEBUG(LOG_CORE, "%s:plugin not exist", __func__);
492 PROFILER_LOG_DEBUG(LOG_CORE, "%s:plugin not exist", __func__);