From: Chris L. <sa...@sk...> - 2000-07-07 20:17:11
|
> > :( If there is any other useful thing to fit into two bytes... that would > > be cool too! > > There are some tools for instrumenting code. > > http://www.cs.umd.edu/projects/dyninstAPI/ > > A small modification would make possible to change "int $80" for more > elavorate code. This has to be done when the code is loaded > (fs/binfmt_elf.c) but I think that it's feasable. I did a quick scour across their web site (and the paradyn projects site) to try to find a brief overview of how it works... but couldn't find anything. Do you know how they deal with this problem? My guess is that they take the code they are overwriting and inline it into the function that they are adding... It's interesting, but would that add too much bloat to the kernel? -Chris > > On Fri, 7 Jul 2000, Jose Renau wrote: > > > > > > > > If the idea is to increase the performance, why not no change the "int > > > $80" for a "call um_syscall". um_syscall can "communicate" when it's > > > strictly necessary. For example, a getpid could be done locally. > > > > > > This optimization could do te umlinux even faster than the "default" > > > Linux. > > > > > > Suggestions? > > > > > > On Fri, 7 Jul 2000, Chris Lattner wrote: > > > > > > > Currently, syscall entry requires the tracing thread to wake up, munge the > > > > registers around, and do other stuff before the syscall'ing thread > > > > continues in the kernel... I have two ideas to improve syscall > > > > performance: > > > > > > > > 1. Instead of changing EAX to make the syscall do a getpid, why not just > > > > add 2 to the EIP to skip over the int 80? > > > > 2. Additionally, why not change that int 80 to be "ud2" or some other > > > > opcode that will cause a SIGILL? When receiving a sigill, just check for > > > > the magic opcode and if it is set, do the syscall... this would have the > > > > advantage that the ptrace/c-switch overhead would be reduced... > > > > > > > > Does anyone see any problems with these suggestions? I may be interested > > > > in implementing them if not... > > > > > > > > -Chris > > > > > > > > > > > > > > > > _______________________________________________ > > > > User-mode-linux-devel mailing list > > > > Use...@li... > > > > http://lists.sourceforge.net/mailman/listinfo/user-mode-linux-devel > > > > > > > > > > ------------------------------------------------------------------- > > > Jose Renau Ardevol | The great things in life are what they > > > re...@ui... | seem to be. Oscar Wilde > > > ------------------------------------------------------------------- > > > > > > > > > _______________________________________________ > > > User-mode-linux-devel mailing list > > > Use...@li... > > > http://lists.sourceforge.net/mailman/listinfo/user-mode-linux-devel > > > > > > > ------------------------------------------------------------------- > Jose Renau Ardevol | The great things in life are what they > re...@ui... | seem to be. Oscar Wilde > ------------------------------------------------------------------- > |