upenn-acg / ocolos-public Goto Github PK
View Code? Open in Web Editor NEWOcolos is the first online code layout optimization system for unmodified applications written in unmanaged languages.
License: BSD 2-Clause "Simplified" License
Ocolos is the first online code layout optimization system for unmodified applications written in unmanaged languages.
License: BSD 2-Clause "Simplified" License
Sorry to interrupt!
When I use the './trace' command, I get an error:
Error:
cycles:u: PMU Hardware doesn't support sampling/overflow-interrupts.try 'perf stat'.
Then subsequent commands (including perf2bolt, bolt, etc.) fail to execute
Do I need to change the perf command, will it affect the performance of my ocolos? Or do I need to do something else? Maybe my computer doesn't support it?
After running the program and comparing it, I found that the performance has hardly improved. Could you please help me find out the reason?
When I looked at the data from the runtime console, I noticed several suspicious things:
I modified the MySQL part of this project into MongoDB, including files such as config, src/utils.cpp, src/infrastructure.cpp and src/tracer.cpp, and used YCSB to drive MongoDB for testing. The following error occurs when executing the ./tracer command:
[tracer][error] thread 2129 delivers a non-SIGSTOP signal
[tracer][error] tracee exits normally, exit num = 1
The full console output is as follows:
error.txt
Hope to get your help, thank you!
I have used the extract_call_sites to produced the call site information successfully, but the tracer doesn't work normally with the error “thread 87732 delivers a non-SIGSTOP signal” and "ERROR: couldn't find symbol for function address 0x20520f0". The complete output is shown in the link below:
https://github.com/onroadmuwl/ocolos_tracer_error/blob/main/tracer.out
Any way to fix that?
Thanks.
I have built this target binary, but when I use it to generate call_sites_all.bin file ,it always get nothing. I saw the standard output get the call site infomation, but it didn't write into this file. That made me so confused. The standard output looks like this.
....
00000000042996b0 0000000000000030 B _ZN53protobuf_replication_asynchronous_connection_failover33_VariableStatus_default_instance_E
00000000042996e0 0000000000000040 B _ZN53protobuf_replication_asynchronous_connection_failover37_VariableStatusList_default_instance_E
0000000004299720 0000000000000080 B _ZN53protobuf_replication_asynchronous_connection_failover48_SourceAndManagedAndStatusList_default_instance_E
[extract_call_sites] 61186 functions in the original binary
the size of call_sites = 0
the size of call_sites = 0
the size of call_sites = 0
the size of call_sites = 0
the size of call_sites = 0
the size of call_sites = 0
the size of call_sites = 0
the size of call_sites = 0
the size of call_sites = 0
the size of call_sites = 0
the size of call_sites = 0
the size of call_sites = 0
the size of call_sites = 0
the size of call_sites = 0
the size of call_sites = 0
the size of call_sites = 0
@@@@@@@@@@@@ the size of call_sites (final) = 0
########### the size of call_sites_list = 0
Who can tell why? Thanks
I am trying to understand the detailed process of ocolos's code replacement, but I am unable to reach the insert_machine_code() function through GDB. Would you like to guide me through the general steps of debugging replace_function.so? Here's what I've tried so far:
[tracer] thread id = 1236504, rip = 7f8dd628b99f
[tracer] before SINGLESTEP, set RIP = 7f8dd6b0be1c (lib addr)
[tracer] receive SIGSTOP from tracee (lib code), tracee finished a SINGLESTEP!
[tracer] after SINGLESTEP, RIP = 7f8dd6b0be1b[tracer] thread id = 1236508, rip = 7f8dd629173d
[tracer] before SINGLESTEP, set RIP = 7f8dd6b0be1c (lib addr)
[tracer] receive SIGSTOP from tracee (lib code), tracee finished a SINGLESTEP!
[tracer] after SINGLESTEP, RIP = 7f8dd6b0be20
[tracer] after a PTRACE_SINGLESTEP, do a PTRACE_CONT
[tracer] connection from 127.0.0.1
[tracer] after PTRACE_CONT, tracee delivers a signal Stopped (signal)
[tracer] RIP = 7f8dd66cd289
[tracer] machine code insertion finishes!
[tracer][time] machine code insertion took 2.071340 seconds to execute
[tracer][OK] code replacement done!
(gdb) b insert_machine_code
Breakpoint 1 at 0x7f8dd6b0be1c
(gdb) continue
Continuing.Program received signal SIGSTOP, Stopped (signal).
syscall () at ../sysdeps/unix/sysv/linux/x86_64/syscall.S:38
38 in ../sysdeps/unix/sysv/linux/x86_64/syscall.S
(gdb) b insert_machine_code
Breakpoint 1 at 0x7f8dd6b0be1c
(gdb) handle SIGSTOP nopass
Signal Stop Print Pass to program Description
SIGSTOP Yes Yes No Stopped (signal)
(gdb) handle SIGSTOP nostop
Signal Stop Print Pass to program Description
SIGSTOP No Yes No Stopped (signal)
(gdb) continue
Continuing.
(gdb) b insert_machine_code
Breakpoint 1 at 0x7f8dd6b0be1c
(gdb) shell kill -CONT 1236504
(gdb) continue
Continuing.
May I ask you how you usually debug and understand the code inside “replace_function.so”?
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.