+bool install_plugin(char * name) {
+ ModelVector<TraceAnalysis *> * registeredanalysis=getRegisteredTraceAnalysis();
+ ModelVector<TraceAnalysis *> * installedanalysis=getInstalledTraceAnalysis();
+
+ for(unsigned int i=0;i<registeredanalysis->size();i++) {
+ TraceAnalysis * analysis=(*registeredanalysis)[i];
+ if (strcmp(name, analysis->name())==0) {
+ installedanalysis->push_back(analysis);
+ return false;
+ }
+ }
+ model_print("Analysis %s Not Found\n", name);
+ return true;
+}
+
+void parse_options(struct model_params *params) {
+ const char *shortopts = "hrnt:o:x:v:m:f:";
+ const struct option longopts[] = {
+ {"help", no_argument, NULL, 'h'},
+ {"removevisible", no_argument, NULL, 'r'},
+ {"analysis", required_argument, NULL, 't'},
+ {"options", required_argument, NULL, 'o'},
+ {"maxexecutions", required_argument, NULL, 'x'},
+ {"verbose", optional_argument, NULL, 'v'},
+ {"minsize", required_argument, NULL, 'm'},
+ {"freqfree", required_argument, NULL, 'f'},
+ {0, 0, 0, 0} /* Terminator */
+ };
+ int opt, longindex;