patrikaaberg / dmce Goto Github PK
View Code? Open in Web Editor NEWDid My Code Execute - C/C++ source code level tracer
License: MIT License
Did My Code Execute - C/C++ source code level tracer
License: MIT License
When trying to probe an OpenJDK version I got a lot of error messages. These error messages was received when trying to probe using dmce-launcher -aq on a directory with many files in it (about 4000 files). This issue could be worked around by increasing the limit of allowed open files, using ulimit -n . Here is a snippet of the error messages received:
Exception in thread Thread-6813:
Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib/python3.6/threading.py", line 864, in run
self._target(self._args, **self._kwargs)
File "/usr/share/dmce/dmce-copy-headers", line 38, in parse_file
fp = open(f)
OSError: [Errno 24] Too many open files: '/home/samuel/Documents/MasterThesis/openJDKTest/jdk17/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetArgumentsSize/argsize001/argsize001.cpp'
Exception in thread Thread-6812:
Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib/python3.6/threading.py", line 864, in run
self._target(self._args, self._kwargs)
File "/usr/share/dmce/dmce-copy-headers", line 38, in parse_file
fp = open(f)
OSError: [Errno 24] Too many open files: '/home/samuel/Documents/MasterThesis/openJDKTest/jdk17/test/hotspot/jtreg/vmTestbase/nsk/jvmti/SetLocalVariable/setlocal001/setlocal001.cpp'
Exception in thread Thread-6815:
Traceback (most recent call last):
File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
self.run()
File "/usr/lib/python3.6/threading.py", line 864, in run
self._target(*self._args, self._kwargs)
File "/usr/share/dmce/dmce-copy-headers", line 38, in parse_file
fp = open(f)
OSError: [Errno 24] Too many open files: '/home/samuel/Documents/MasterThesis/openJDKTest/jdk17/test/hotspot/jtreg/vmTestbase/nsk/jvmti/GetArgumentsSize/argsize002/argsize002.cpp'
Currently, when running dmce in a directory that does not contain a git repository, the user is not given any information about the execution:
not/a/repo$ dmce
not/a/repo$
Proposed output:
not/a/repo$ dmce
error: current directory does not contain a git repository
not/a/repo$
I'm unable to insert any probes, following the below steps.
Why is it reporting 'Probes inserted: 0'?
This looks like some very promising work.
Is there a FAQ or support community behind this project?
Thanks,
ksfasf
Regarding this execution, the time taken for the command to return control of the interactive shell was around 2 minutes for 32 probes.
Can this elapsed time be reduced?
I have been using DMCE on our code base for running tests daily. We needed to collect historical data so besides running tests daily, I am also running a script that iterates through our git history and runs the tests in an iterative manner on a day-2-day basis.
DMCE runs fine most of the times but we have a scenario where the number of unique probes traversed was more than the actual number of probes resulting into coverage % of 131.4.
Coverage %: 131.4 %
Total Number of Probes: 35
Unique probes: 46
Revisited Probes: 77
Maybe there is a corner case. More details and logs can be provided on request.
The regex expression used in print_summary.py for checking whether a probe is executed or not can also match output errors from the compiler. A proper regex should check if a probe number is printed instead.
i.e.
.DMCE_PROBE((.)).* should be .DMCE_PROBE((\d+)).
I am providing a PR for the same.
Is there a support forum or similar for dmce?
Do you have any usage statistics? How big is the user base?
OpenJDK 11u, 2c47c45f0747e86a3b97384bea48107627ffd040
:
Instrumenting the following line 102
in src/hotspot/share/oops/objArrayKlass.cpp
:
if (!element_klass->is_instance_klass() ||
(name = InstanceKlass::cast(element_klass)->array_name()) == NULL) {
leads to the semantically different code below:
if (!(DMCE_PROBE(25201), element_klass->is_instance_klass() ||
(name = InstanceKlass::cast(element_klass)->array_name()) == NULL)) {
Ignoring the DMCE_PROBE(), the code above replaces (!a || b)
by (!(a || b))
, i.e., it negates the entire disjunction rather than just the left-hand side of the ||
.
A semantics-preserving replacement would be:
if (DMCE_PROBE(25201), !element_klass->is_instance_klass() ||
(name = InstanceKlass::cast(element_klass)->array_name()) == NULL) {
which works as intended.
dmce-configure-local sets
DMCE_POST_HOOK:
When changing profile to racecheck
with dmce-set-profile -p -d /PATH/TO/DMCE racecheck
the code in setProbeOrProlog
misfires and sets DMCE_POST_HOOK:/dmce-post-hook-racheck
, which is not a valid path.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.