Messages in this thread | | | Subject | RE: [PATCH] provide hrtimer exports for module use [Was:Exportsfor hrtimer APIs] | Date | Tue, 14 Mar 2006 15:31:45 -0800 | From | "Stone, Joshua I" <> |
| |
Thomas Gleixner wrote: > I have no clue where the block of code written by the user is executed > and why it needs exports. When a user writes code he can use the > existing userpsace interfaces, so why does the module need that > exports ?
Sorry - by user I mean a SystemTap user, who must be a priviledged user to run SystemTap and load a kernel module in the first place. When a script is executed, the following happens:
1. The script with the user's probes is parsed by SystemTap. 2. SystemTap generates C code for a kernel module that implements the probes. 3. The module is compiled and loaded into the kernel. 4. On loading, the probes register with the appropriate kernel APIs. For function probes, this means using the kprobes interface. For asynchronous timer probes, the module must call timer APIs - e.g. hrtimers. 5. As the events occur, the probe bodies are executed. 6. Finally the module terminates, unregisters all probes, and is unloaded from the kernel.
In order to call hrtimer_init and such in step 4, those functions need to be exported.
Josh - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |