Coder Social home page Coder Social logo

Comments (3)

xiaoxiang781216 avatar xiaoxiang781216 commented on August 29, 2024

--wrap is only used in the flat build, for kernel/protected build the hook come from syscall.csv.

from nuttx.

pussuw avatar pussuw commented on August 29, 2024

When SCHED_INSTRUMENTATION_SYSCALL is enabled, --wrap is used to generate wrappers that encapsulate the system call itself into:

int __wrap_syscall_xx(int nr, ...)
{
  sched_note_syscall_enter(int nr, int argc, ...);
  result = __real_syscall_xx();
  sched_note_syscall_leave(int nr, uintptr_t result);
  return result;
}

This is done for every symbol in the syscall table, which includes nxsem_xx et al. The OS calls them directly and as they are now wrapped, they execute the same __wrap_sem_xx call. This is problematic, as it impacts performance as well as clutters the instrumentation with calls that are not system calls from user space (which is what I want to instrument).

from nuttx.

xiaoxiang781216 avatar xiaoxiang781216 commented on August 29, 2024

Ok, I forget that only the initial version doesn't use --wrap. @YuuichiNakamura switch to --wrap to support the syscall instrumentation in flat build. One possible fix is moving --wrap from kernel bin to userspace libc.

from nuttx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.