Re: [Valgrind-users] Regarding use of Lackey to trace midway execution of a program
If you are envisaging to modify valgrind, you could take some inspiration from the way callgrind can dynamically activate/de-activate tracing. See callgrind manual command line options and client requests for more details Philippe On Wed, 2023-02-08 at 17:47 +1100, Eliot Moss wrote: > On 2/8/2023 4:10 PM, SAI GOVARDHAN M C PES1UG19EC255PESU ECE Student wrote: > > Hi, > > > > We are students working on memory access analysis, using the Lackey tool in > > Valgrind. > > Our memory trace results in a large log file, and we need the trace from > > discrete points of > > execution (between 40-60%). > > Instead of logging completely, and splitting manually, is there a way we > > can modify the Lackey > > command to pick from a desired point in the execution? > > > > For reference, the command we use is > > $ valgrind --tool=lackey --trace-mem=yes --log-file=/path_to_log ./program > > > > We need to modify this to command to trace from 40-60% of the program > > If you know the approximate number of memory accesses, you could do something > as simple as: > > valgrind ... | tail +n XXX | head -n YYY > > to start after XXX lines of output and stop after producing YYY lines. You > could do something more sophisticated using, say, gawk, to trigger on a > particular address being accessed, e.g., as an instruction fetch. > > This will all slow things down a bit, but might accomplish your goals. > > I'm not claiming there isn't some sophisticated way to tell valgrind when > to start tracing, either. Also, nobody is stopping you from customizing > the tool yourself :-) ... a mere exercise in programming, no? > > Best wishes - EM > > > ___ > Valgrind-users mailing list > Valgrind-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/valgrind-users ___ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users
Re: [Valgrind-users] Regarding use of Lackey to trace midway execution of a program
On 2/8/2023 4:10 PM, SAI GOVARDHAN M C PES1UG19EC255PESU ECE Student wrote: Hi, We are students working on memory access analysis, using the Lackey tool in Valgrind. Our memory trace results in a large log file, and we need the trace from discrete points of execution (between 40-60%). Instead of logging completely, and splitting manually, is there a way we can modify the Lackey command to pick from a desired point in the execution? For reference, the command we use is $ valgrind --tool=lackey --trace-mem=yes --log-file=/path_to_log ./program We need to modify this to command to trace from 40-60% of the program If you know the approximate number of memory accesses, you could do something as simple as: valgrind ... | tail +n XXX | head -n YYY to start after XXX lines of output and stop after producing YYY lines. You could do something more sophisticated using, say, gawk, to trigger on a particular address being accessed, e.g., as an instruction fetch. This will all slow things down a bit, but might accomplish your goals. I'm not claiming there isn't some sophisticated way to tell valgrind when to start tracing, either. Also, nobody is stopping you from customizing the tool yourself :-) ... a mere exercise in programming, no? Best wishes - EM ___ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users
[Valgrind-users] Regarding use of Lackey to trace midway execution of a program
Hi, We are students working on memory access analysis, using the Lackey tool in Valgrind. Our memory trace results in a large log file, and we need the trace from discrete points of execution (between 40-60%). Instead of logging completely, and splitting manually, is there a way we can modify the Lackey command to pick from a desired point in the execution? For reference, the command we use is $ valgrind --tool=lackey --trace-mem=yes --log-file=/path_to_log ./program We need to modify this to command to trace from 40-60% of the program Regards ___ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users