Skip to content

Commit

Permalink
Replace measureTime=true with +d=measureTime in buildModel/etc
Browse files Browse the repository at this point in the history
- Fix code generation for profiling of function calls (was disabled)
- Fix the counter for number of profiling blocks so the profiling now includes the measured blocks again


git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@20251 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Apr 24, 2014
1 parent 4103dcb commit 18d6156
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
7 changes: 5 additions & 2 deletions OMEdit/OMEditGUI/GUI/Dialogs/SimulationDialog.cpp
Expand Up @@ -919,8 +919,11 @@ void SimulationDialog::simulate()
mSimulationParameters.append(", variableFilter=").append("\"").append(mpVariableFilterTextBox->text()).append("\"");
if (!mpCflagsTextBox->text().isEmpty())
mSimulationParameters.append(", cflags=").append("\"").append(mpCflagsTextBox->text()).append("\"");
if (mpProfilingCheckBox->isChecked())
mSimulationParameters.append(", measureTime=true");
if (mpProfilingCheckBox->isChecked()) {
mpMainWindow->getOMCProxy()->setDebugFlags("measureTime");
} else {
mpMainWindow->getOMCProxy()->setDebugFlags("nomeasureTime");
}
// setup simulation flags
// setup Model Setup file flag
if (!mpModelSetupFileTextBox->text().isEmpty())
Expand Down
6 changes: 6 additions & 0 deletions OMEdit/OMEditGUI/OMC/OMCProxy.cpp
Expand Up @@ -2428,3 +2428,9 @@ void CustomExpressionBox::keyPressEvent(QKeyEvent *event)
QLineEdit::keyPressEvent(event);
}
}

bool OMCProxy::setDebugFlags(QString debugFlags)
{
sendCommand("setDebugFlags(\"" + debugFlags + "\")");
return StringHandler::unparseBool(getResult());
}
1 change: 1 addition & 0 deletions OMEdit/OMEditGUI/OMC/OMCProxy.h
Expand Up @@ -211,6 +211,7 @@ class OMCProxy : public QObject
QString getDerivedClassModifierValue(QString className, QString modifierName);
bool getDocumentationClassAnnotation(QString className);
QString numProcessors();
bool setDebugFlags(QString flags);
signals:
void commandFinished();
public slots:
Expand Down

0 comments on commit 18d6156

Please sign in to comment.