ZeroC

Archived

This forum has been archived. Please start a new discussion on GitHub.

How to setup valgrind

Olivier54653
Olivier54653

Hello,

I would like to know what are the best practices to use valgrind with Ice.

With the following xml as an example:

<application name="Ripper">
    <node name="Node1">
        <server id="EncoderServer" exe="/opt/ripper/bin/server" activation="on-demand">
            <adapter name="EncoderAdapter" id="EncoderAdapter" endpoints="tcp"/>
            <property name="Ice.Trace.Network" value="1"/>
        </server>
    </node>
</application>

how should I change it so that the executable /opt/ripper/bin/server is lauched using valgrind? Is it as simple as replacing /opt/ripper/bin/server by valgrind /opt/ripper/bin/server?

Thank you for you help!
Olivier

Tagged:

Comments

  • xdm
    xdm La Coruña, Spain
    edited June 2019

    Hi,

    You should use valgrind as the server exe and pass your server as an argument using the option element, something like:

    <application name="Ripper">
        <node name="Node1">
            <server id="EncoderServer" exe="valgrind" activation="on-demand">
                <adapter name="EncoderAdapter" id="EncoderAdapter" endpoints="tcp"/>
                <property name="Ice.Trace.Network" value="1"/>
                 <option>/opt/ripper/bin/server</option>
            </server>
        </node>
    </application>
    

    see https://doc.zeroc.com/ice/3.7/ice-services/icegrid/icegrid-xml-reference/using-command-line-options-in-descriptors

  • Olivier54653
    Olivier54653

    Thank you Jose for the quick answer!