This shows you the differences between two versions of the page.
|
ep:teme:01 [2026/03/04 14:29] radu.mantu |
ep:teme:01 [2026/03/04 14:35] (current) radu.mantu [Memory access tracing] |
||
|---|---|---|---|
| Line 11: | Line 11: | ||
| ==== Partner up ==== | ==== Partner up ==== | ||
| - | Select a partner for this assignment and submit your choice via [[https://forms.gle/unnN3f8pksSbg85g9|this form]]. | + | Select a partner for this assignment and submit your choice via [[https://forms.gle/unnN3f8pksSbg85g9|this form]]. \\ |
| + | If you can't find a partner, try advertising on the [[https://curs.upb.ro/2025/mod/forum/discuss.php?d=3902|assignment forum]]. | ||
| <note important> | <note important> | ||
| - | Only one student is required to complete the form on behalf of the team. | + | Only one student is required to complete the form on behalf of the team.\\ |
| - | + | Only one student (not necessarily the same) will have to upload the assignment on moodle.\\ | |
| - | Only one student (not necessarily the same) will have to upload the assignment on moodle. | + | |
| You are **required** to work with a partner on this assignment. | You are **required** to work with a partner on this assignment. | ||
| </note> | </note> | ||
| Line 23: | Line 22: | ||
| ==== Usage ==== | ==== Usage ==== | ||
| - | Your application should be implemented in C/C++ and take as positional arguments the commandline invocation of the program under test. For example, ''./my_tracer curl http://example.com'' will launch the tracer program that will then fork() & exec() **curl** and start monitoring its memory transactions at the same time. In case you need to add flags to your application, you can separate them from the child process' commandline with ''%%--%%''. | + | Your application should be implemented in C/C++ and take as positional arguments the commandline invocation of the program under test. For example, ''./my_tracer curl http://example.com'' will launch the tracer program that will then fork() & exec() **curl** and start monitoring its memory transactions at the same time. In case you need to add flags to your application, you can separate them from the commandline of the child process with ''%%--%%''. |
| ==== Memory access tracing ==== | ==== Memory access tracing ==== | ||
| - | Once the child process is up and running, you will have to monitor the **read** and **write** operations //separately//. Specifically, you will have to determine **what address has been accessed** and **what instruction has performed this access**. This can be achieved using [[https://www.intel.com/content/www/us/en/developer/articles/technical/timed-process-event-based-sampling-tpebs.html|Intel Processor Event Based Sampling (PEBS)]], a mode of operation that will write detailed sample information in a physical memory ring buffer whenever the event counter triggers. You will not be required to interact with this system directly, but instead utilize the [[https://man.archlinux.org/man/perf_event_open.2.en#MMAP_layout|sampled mode]] of Linux Perf Events. | + | Once the child process is up and running, you will have to monitor the **read** and **write** operations //separately//. Specifically, you will have to determine **what address has been accessed** and **what instruction performed this access**. This can be achieved using [[https://www.intel.com/content/www/us/en/developer/articles/technical/timed-process-event-based-sampling-tpebs.html|Intel Processor Event Based Sampling (PEBS)]], a mode of operation that will write detailed sample information in a physical memory ring buffer whenever the event counter triggers. You will not be required to interact with this system directly, but instead utilize the [[https://man.archlinux.org/man/perf_event_open.2.en#MMAP_layout|sampled mode]] of Linux Perf Events. |
| ==== Mapping addresses to objects ==== | ==== Mapping addresses to objects ==== | ||
| Line 72: | Line 71: | ||
| The **first pair** that submits an assignment that receives **full marks** will automatically pass the exam with a maximum grade. | The **first pair** that submits an assignment that receives **full marks** will automatically pass the exam with a maximum grade. | ||
| </note> | </note> | ||
| + | |||
| + | ===== FAQ ===== | ||
| + | |||
| + | :?: | ||