You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the libmprofile currently lives in sashan's junk repository (https://github.com/sashan/ossl-scripts/ in folder mprofile) it will be moved. however the library is not needed.
The libmprofile.so is supposed to be loaded via LD_PRELOAD env. variable. Also to produce json output one must also specify MPROFILE_OUTF env. variable which defines path to file where json output will be saved. For example running commands:
Keep in mind the resulting .json file is almost 1GB long (it's ~70MB when gziped). So the .json output can take a lot of space.
The plan is to use unit tests we have in openssl/test directory. To obtain memory profile data one would run for example tests like this:
DO_MPROFILE=1 make test
When DO_MPROFILE is 1 the test execution then arranges things such json files are obtained (and perhaps processed too). Perhaps path to libmprofile.so should be also specified in dedicated env. var (for example LIBMPROFILE=/path/to/mprofile/libmprofile.so)
The test binaries are executed by perl test runner found here: util/perl/OpenSSL/Test.pm. There you will find function sub(), app(), test(), ... I think this is the place where to arrange environment so mprofile json data can be obtained.
perhaps the test when running in mprofile mode should process the .json data and delete them after saving results. We are currently interested in mprofile.py -m output only. The result should be saved to test-runs directory. The file with result should be derived from test name for example test_evp.mprofile
We can also expect some hurdles on the way, for example there might be tests which are not libmprofile friendly. So perhaps we should mark such tests in test recipe the profiling should not be performed.
The text was updated successfully, but these errors were encountered:
There are actually two kinds of tests in opensl/test directory:
tests which are linked with static libcrypto (this seems fairly common)
tests which are linked with shared libcrypto (.so), just some tests.
the tests which use dynamic libcrypto can use LD_PRELOAD to start building memory profile using libmprofile.so
for tests which are linked with static version of libcrypto we need to extend libtestutil. However this requires to add compile time option to Configure script (./Configure enable-mprofile).
the libmprofile currently lives in sashan's junk repository (https://github.com/sashan/ossl-scripts/ in folder
mprofile
) it will be moved. however the library is not needed.The libmprofile.so is supposed to be loaded via
LD_PRELOAD
env. variable. Also to produce json output one must also specifyMPROFILE_OUTF
env. variable which defines path to file where json output will be saved. For example running commands:will create .json file with memory profile for
openssl speed ...
command. To calculate maximum heap size took by process one runs command:Keep in mind the resulting .json file is almost 1GB long (it's ~70MB when gziped). So the .json output can take a lot of space.
The plan is to use unit tests we have in
openssl/test
directory. To obtain memory profile data one would run for example tests like this:When
DO_MPROFILE
is 1 the test execution then arranges things such json files are obtained (and perhaps processed too). Perhaps path to libmprofile.so should be also specified in dedicated env. var (for exampleLIBMPROFILE=/path/to/mprofile/libmprofile.so
)The test binaries are executed by perl test runner found here:
util/perl/OpenSSL/Test.pm
. There you will find functionsub()
,app()
,test()
, ... I think this is the place where to arrange environment somprofile
json data can be obtained.perhaps the test when running in mprofile mode should process the .json data and delete them after saving results. We are currently interested in
mprofile.py -m
output only. The result should be saved totest-runs
directory. The file with result should be derived from test name for exampletest_evp.mprofile
We can also expect some hurdles on the way, for example there might be tests which are not libmprofile friendly. So perhaps we should mark such tests in test recipe the profiling should not be performed.
The text was updated successfully, but these errors were encountered: