Hello AllI am trying to use dynamorio, valgrind, and pin to check every memory reference(somewhat like drmemory, memcheck but track which part (heap/stack/global) of the memory the program is reading or writing) and compare their performance. I am adding code to memtrace but memtrace seems so slow. I've commented out the print out part still it is so slow compared to valgrind, and pin. I use bzip2 (10MB random file) to check performance and it seems drmemory's memtrace is about 5 times slower than others(It takes about 5 mins while others take about 1 min. It takes about 2 sec natively). I've read the paper that says drmemory is faster than valgrind memcheck. Is the memtrace not optimized? Am I doing something wrong?
--
You received this message because you are subscribed to the Google Groups "DynamoRIO Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/dynamorio-users/-/iTJY9kPLxnAJ.
To post to this group, send email to dynamor...@googlegroups.com.
To unsubscribe from this group, send email to dynamorio-use...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/dynamorio-users?hl=en.
Hello AllI am trying to use dynamorio, valgrind, and pin to check every memory reference(somewhat like drmemory, memcheck but track which part (heap/stack/global) of the memory the program is reading or writing) and compare their performance. I am adding code to memtrace but memtrace seems so slow. I've commented out the print out part still it is so slow compared to valgrind, and pin. I use bzip2 (10MB random file) to check performance and it seems drmemory's memtrace is about 5 times slower than others(It takes about 5 mins while others take about 1 min. It takes about 2 sec natively). I've read the paper that says drmemory is faster than valgrind memcheck. Is the memtrace not optimized? Am I doing something wrong?
--
You received this message because you are subscribed to the Google Groups "DynamoRIO Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/dynamorio-users/-/iTJY9kPLxnAJ.
To post to this group, send email to dynamor...@googlegroups.com.
To unsubscribe from this group, send email to dynamorio-use...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/dynamorio-users?hl=en.
Thank you for the reply. I am using memtrace to track whole memory reference and try to find out how many bytes the program reads or writes on the specific region (stack, heap, global). It seems memtrace is significantly slower than the similar examples valgrind, and pin provide so I was wondering if I'm doing something wrong since the dynamorio is regarded as the most fast DBI. Is there any optimization I could do?
- Wonjoon
On Thursday, September 13, 2012 5:54:14 PM UTC-4, Derek Bruening wrote:The sample client memtrace.c that comes with DynamoRIO has no relation to Dr. Memory. The two have completely different goals. Dr. Memory has no need to store the entire history of memory accesses: it checks each as it occurs, updating and propagating shadow values that reflect the current state of memory. OTOH, memtrace wants a record of the full history, which it writes to a buffer which is written out to a file.- DerekOn Thu, Sep 13, 2012 at 5:47 PM, Wonjoon Song <tempt...@gmail.com> wrote:
Hello AllI am trying to use dynamorio, valgrind, and pin to check every memory reference(somewhat like drmemory, memcheck but track which part (heap/stack/global) of the memory the program is reading or writing) and compare their performance. I am adding code to memtrace but memtrace seems so slow. I've commented out the print out part still it is so slow compared to valgrind, and pin. I use bzip2 (10MB random file) to check performance and it seems drmemory's memtrace is about 5 times slower than others(It takes about 5 mins while others take about 1 min. It takes about 2 sec natively). I've read the paper that says drmemory is faster than valgrind memcheck. Is the memtrace not optimized? Am I doing something wrong?--To post to this group, send email to dynamor...@googlegroups.com.
You received this message because you are subscribed to the Google Groups "DynamoRIO Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/dynamorio-users/-/iTJY9kPLxnAJ.
To unsubscribe from this group, send email to dynamorio-use...@googlegroups.com.--
You received this message because you are subscribed to the Google Groups "DynamoRIO Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/dynamorio-users/-/NumyT9mOsLUJ.
To post to this group, send email to dynamor...@googlegroups.com.
To unsubscribe from this group, send email to dynamorio-use...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/dynamorio-users?hl=en.
To view this discussion on the web visit https://groups.google.com/d/msg/dynamorio-users/-/jkKITczziIgJ.
To post to this group, send email to dynamor...@googlegroups.com.
To unsubscribe from this group, send email to dynamorio-use...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/dynamorio-users?hl=en.
To view this discussion on the web visit https://groups.google.com/d/msg/dynamorio-users/-/xfXEwr3bwZwJ.
To post to this group, send email to dynamor...@googlegroups.com.
To unsubscribe from this group, send email to dynamorio-use...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/dynamorio-users?hl=en.
Thank you for the reply. I am using memtrace to track whole memory reference and try to find out how many bytes the program reads or writes on the specific region (stack, heap, global). It seems memtrace is significantly slower than the similar examples valgrind, and pin provide so I was wondering if I'm doing something wrong since the dynamorio is regarded as the most fast DBI. Is there any optimization I could do?
--
You received this message because you are subscribed to the Google Groups "DynamoRIO Users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/dynamorio-users/-/6gFpjRugWpUJ.
To post to this group, send email to dynamor...@googlegroups.com.
To unsubscribe from this group, send email to dynamorio-use...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/dynamorio-users?hl=en.
Hello QinThank you for the reply. RecordMemWrite just adds up bytes to each region counter (heap, stack, global, other).VOID PIN_FAST_ANALYSIS_CALL RecordMemWrite(VOID * ip, ADDRINT addr, UINT32 size){if (stack_range.upper > addr && addr > stack_range.lower) {stack_count.write += size;}else if (heap_range.upper > addr && addr > heap_range.lower) {heap_count.write += size;}else if (stack_range.upper > addr && addr > stack_range.lower) {stack_count.write += size;}else {other_count.write += size;}}Basically valgrind, and dynamo tool also has this part since I am trying to do same work with each tool. At dynamorio's memtrace.c I modified memtrace function frommemtrace(void *drcontext){/* some code*/for (i = 0; i < num_refs; i++) {dr_fprintf(data->log, PFX",%c,%d,"PFX"\n",mem_ref->pc, mem_ref->write ? 'w' : 'r', mem_ref->size, mem_ref->addr);++mem_ref;}/*some code*/}tomemtrace(void *drcontext){/* some code*/for (i = 0; i < num_refs; i++) {if (mem_ref->write)RecordMemWrite(mem_ref->size, mem_ref->addr);elseRecordMemRead(mem_ref->size, mem_ref->addr);++mem_ref;}/*some code*/}Even if I don't use RecordMemWrite in memtrace, it is still slow when I use bzip2 to evaluate performance (10MB random file). pin takes about 75 secs while dynamorio takes about 400 secs.Also, for pin, I think I should use INS_InsertFillBufferPredicated instead of INS_InsertPredicatedCall since dynamorio's memtrace uses buffer. But still, memtrace seems slower.Wonjoon
To view this discussion on the web visit https://groups.google.com/d/msg/dynamorio-users/-/QygjpFopC8AJ.
To view this discussion on the web visit https://groups.google.com/d/msg/dynamorio-users/-/OYyyOxtligUJ.
Thank you for the reply. If I add a jmp to RecordMemWrite or RecordMemRead code cache at instrument_mem() and remove buffer filling, would it match other tools?