Commit 2a2996ef authored by Ramon Nou's avatar Ramon Nou
Browse files

update readme, expand .ci

parent 90b66b34
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -57,8 +57,8 @@ unit-test-job: # This job runs in the test stage.
  needs: ['build-job']
  script:
    - ls -ltrh ${INSTALL_PATH}
    - ${BUILD_PATH}/opendevnull --syscall getpid
    - LD_PRELOAD=${BUILD_PATH}/libeval_intercept.so ${BUILD_PATH}/opendevnull --syscall getpid
    - ${BUILD_PATH}/opendevnull --syscall getpid --reps 1 --verbose
    - LD_PRELOAD=${BUILD_PATH}/libeval_intercept.so ${BUILD_PATH}/opendevnull --syscall getpid --reps 1 --verbose
  artifacts:
    expire_in: 1 week
    when: always
+64 −0
Original line number Diff line number Diff line
# Syscall Timing Utility

A tool for measuring and analyzing system call execution times on Linux systems.

## Overview

This project provides utilities to measure and analyze the timing of various system calls, helping developers understand performance characteristics and potential bottlenecks in system-level operations.

## Prerequisites

- Linux operating system
- CMake (version 3.13 or higher)
- C++17 compatible compiler
- syscall_intercept library

## Installation

```bash
mkdir build && cd build
cmake ..
make
make install
```

## Usage

The project includes two main components:
- `eval_intercept`: A shared library for syscall interception
- `opendevnull`: An executable for timing syscalls

### Running opendevnull

```bash
./opendevnull --syscall <open|getpid> [options]

Options:
    --reps N           Number of repetitions (default: 100M)
    --always_syscall   Always execute the original syscall (only use with interception and getpid)
    --verbose          Enable debug output
```

## Example

### Native syscall 
```bash
./opendevnull --syscall getpid
Mean time taken: 0.329911 microseconds
```

### Intercepted syscall (syscall interception -> C hook -> native syscall)
```bash
LD_PRELOAD=./libeval_intercept.so ./opendevnull --syscall getpid --always_syscall
Mean time taken: 0.382829 microseconds
```

### Intercepted syscall (syscall interception -> C hook) , no kernel execution
```bash
LD_PRELOAD=./libeval_intercept.so ./opendevnull --syscall getpid 
Mean time taken: 0.0408641 microseconds
```

## License

This project is licensed under the MIT License - see the LICENSE file for details.
 No newline at end of file