From: Jose R. <re...@cs...> - 2000-07-07 20:06:38
|
On Fri, 7 Jul 2000, Chris Lattner wrote: > The only problem is that you only have two bytes of code space to work > with (int 0x80 is encoded as 0xCD 0x80), and a call takes 5? bytes... > > :( 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. > 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 ------------------------------------------------------------------- |