Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Gazebo 11] Added ignition common profiler #2776

Merged
merged 12 commits into from
Jul 29, 2020

Conversation

ahcorde
Copy link
Contributor

@ahcorde ahcorde commented Jul 3, 2020

I added profile points in ODEPhysics, sensors and some plugins

Here some snapshots:

Selección_044
Selección_042
Selección_041

there is a world called profile.world where you can reproduce these results.

I had to change this line in the CMakeLists.txt to avoid create a Profile Singleton in each library. I can provide more details about this if necessary.

from

  filter_valid_compiler_flags(-fvisibility=hidden -fvisibility-inlines-hidden)

to

  filter_valid_compiler_flags(-fvisibility-inlines-hidden)

is this change creating a conflict with something specific?

Signed-off-by: ahcorde [email protected]

@ahcorde ahcorde changed the title Added profiler to OdePhysics, sensors and some plugins Added ignition comoon profiler to Gazebo 11 Jul 6, 2020
Signed-off-by: ahcorde <[email protected]>
@ahcorde ahcorde marked this pull request as ready for review July 7, 2020 19:04
@scpeters scpeters changed the title Added ignition comoon profiler to Gazebo 11 Added ignition common profiler to Gazebo 11 Jul 9, 2020
@ahcorde ahcorde changed the title Added ignition common profiler to Gazebo 11 [Gazebo 11] Added ignition common profiler Jul 10, 2020
Copy link
Contributor

@iche033 iche033 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

works for me. I have some minor comments about style and profile names.

CMakeLists.txt Outdated
@@ -260,7 +268,7 @@ filter_valid_compiler_flags(${WARN_LEVEL}
# Check and add visibility hidden by default. Only in UNIX
# Windows and MacosX does not handled properly the hidden compilation
if (UNIX AND NOT APPLE)
filter_valid_compiler_flags(-fvisibility=hidden -fvisibility-inlines-hidden)
filter_valid_compiler_flags(-fvisibility-inlines-hidden)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe @j-rivero can comment on whether this change would be a problem or not?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

friendly ping @j-rivero

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uh, the change is important. Symbols are exposed by default in the ABI unless the fvisibility=hidden flag is provided. This change will increase the ABI size (with an impact on the loader performance) and expose many new symbols to the binary interface. Can we make it conditional somehow to keep the current ABI scheme?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a9230be

gazebo/Server.cc Outdated Show resolved Hide resolved
gazebo/sensors/Sensor.cc Outdated Show resolved Hide resolved
gazebo/sensors/SensorManager.cc Outdated Show resolved Hide resolved
gazebo/sensors/SensorManager.cc Outdated Show resolved Hide resolved
gazebo/physics/ode/ODEPhysics.cc Show resolved Hide resolved
@iche033
Copy link
Contributor

iche033 commented Jul 14, 2020

latest changes look good to me. Just waiting to see if @j-rivero has any thoughts on whether or not it's ok to remove the -fvisibility=hidden compiler flag

@scpeters scpeters added the 11 Gazebo 11 label Jul 15, 2020
gazebo/Server.cc Outdated
sensors::stop();
IGN_PROFILE_END();
}

common::Time::MSleep(1);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm...having a 1 ms sleep in the server runloop seems non-ideal

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I remember seeing this before and wondering why it's there 🧐

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw this while working on lockstepping. I tried removing the line but it caused some sensor tests to fail so I had to put it back in:
https://github.com/osrf/gazebo/pull/2746/files#diff-2e1da9464c22259ef9d9919412c42d2fR617

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if we can we change it to NSleep(1)?

this should happen in a separate PR; I'll try creating a PR with this change

@iche033
Copy link
Contributor

iche033 commented Jul 27, 2020

latest changes look good. There are a few new code check errors found by running sh tools/code_check.sh

@ahcorde
Copy link
Contributor Author

ahcorde commented Jul 28, 2020

@iche033 Any trick to show only the new ones?

@iche033
Copy link
Contributor

iche033 commented Jul 28, 2020

oh I don't know a trick to show just the new errors. I just manually ran code check and checked the errors against the code. Here're the ones I see:

./plugins/LiftDragPlugin.cc:404:  Blank line at the end of a code block.  Is this needed?  [whitespace/blank_line] [3]
./plugins/LinkPlot3DPlugin.cc:207:  { should never be at the end of the previous line  [whitespace/braces] [4]
./gazebo/sensors/WideAngleCameraSensor.cc:185:  { should never be at the end of the previous line  [whitespace/braces] [4]
./gazebo/sensors/SensorManager.cc:19:  Found C++ system header after other header. Should be: c system, c++ system, other, SensorManager.h .  [build/include_order] [4]
./gazebo/sensors/SensorManager.cc:20:  Found C++ system header after other header. Should be: c system, c++ system, other, SensorManager.h .  [build/include_order] [4]
./gazebo/physics/World.cc:40:  Found C++ system header after other header. Should be: c system, c++ system, other, World.h .  [build/include_order] [4]
./gazebo/common/Event.hh:32:  Found C++ system header after other header. Should be: c system, c++ system, other, Event.h .  [build/include_order] [4]
./gazebo/common/Event.hh:280:  { should never be at the end of the previous line  [whitespace/braces] [4]
./gazebo/common/Event.hh:300:  { should never be at the end of the previous line  [whitespace/braces] [4]
./gazebo/common/Event.hh:321:  { should never be at the end of the previous line  [whitespace/braces] [4]
./gazebo/common/Event.hh:343:  { should never be at the end of the previous line  [whitespace/braces] [4]
./gazebo/common/Event.hh:367:  { should never be at the end of the previous line  [whitespace/braces] [4]
./gazebo/common/Event.hh:393:  { should never be at the end of the previous line  [whitespace/braces] [4]
./gazebo/common/Event.hh:420:  { should never be at the end of the previous line  [whitespace/braces] [4]
./gazebo/common/Event.hh:448:  { should never be at the end of the previous line  [whitespace/braces] [4]

Signed-off-by: ahcorde <[email protected]>
@ahcorde ahcorde merged commit 3e5ffc9 into gazebosim:gazebo11 Jul 29, 2020
ahcorde added a commit to ahcorde/gazebo that referenced this pull request Jul 29, 2020
* Added profiler to OdePhysics, sensors and some plugins

Signed-off-by: ahcorde <[email protected]>

* Added profiler to Physic engines: Bullet, DART and Simbody

Signed-off-by: ahcorde <[email protected]>

* Added profiler to plugins

Signed-off-by: ahcorde <[email protected]>

* Added more models to profiler.world

Signed-off-by: ahcorde <[email protected]>

* Add missing ;

Signed-off-by: ahcorde <[email protected]>

* Added option ENABLE_PROFILER to cmake

Signed-off-by: ahcorde <[email protected]>

* Used the same convention in all profiler calls

Signed-off-by: ahcorde <[email protected]>

* Added profiler to Event.hh

Signed-off-by: ahcorde <[email protected]>

* Fixed gazebo_common link against ignition_common

Signed-off-by: ahcorde <[email protected]>

* Added condition to use -fvisibility=hidden when profiler is disabled

Signed-off-by: ahcorde <[email protected]>

* make linters happy

Signed-off-by: ahcorde <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
11 Gazebo 11
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants