Home Help Center

How to setup valgrind

Olivier54653Olivier54653 Member Olivier SohnOrganization: ExaneProject: Pricer

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:

Best Answer

  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    edited June 2019 Answer ✓

    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

Answers

  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    edited June 2019 Answer ✓

    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

  • Olivier54653Olivier54653 Member Olivier SohnOrganization: ExaneProject: Pricer

    Thank you Jose for the quick answer!

Sign In or Register to comment.