.\" Hey Emacs! This file is -*- nroff -*- source. .\" .\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu) .\" Copyright 1996 Hanno Wagner (wagner@bidnix.bid.fh-hannover.de) for the .\" german version .\" .\" Permission is granted to make and distribute verbatim copies of this .\" manual provided the copyright notice and this permission notice are .\" preserved on all copies. .\" .\" Permission is granted to copy and distribute modified versions of this .\" manual under the conditions for verbatim copying, provided that the .\" entire resulting derived work is distributed under the terms of a .\" permission notice identical to this one .\" .\" Since the Linux kernel and libraries are constantly changing, this .\" manual page may be incorrect or out-of-date. The author(s) assume no .\" responsibility for errors or omissions, or for damages resulting from .\" the use of the information contained herein. The author(s) may not .\" have taken the same level of care in the production of this manual, .\" which is licensed free of charge, as they might when working .\" professionally. .\" .\" Formatted or processed versions of this manual, if unaccompanied by .\" the source, must acknowledge the copyright and authors of this work. .\" .\" Modified Fri Jun 23 01:35:19 1995 Andries Brouwer (aeb@cwi.nl) .\" (prompted by bas@phys.uva.nl (Bas V. de Bakker)) .\" Modified 3 May 1996 by Martin Schulze (joey@infodrom.north.de) .\" .TH PROFIL 2 "3. Mai 1996" "Linux 0.99.11" "Systemaufrufe" .SH BEZEICHNUNG profil \- führt ein Zeitprofil aus .\" execution time profile .SH ÜBERSICHT .B #include .sp .BI "int profil(char *" buf ", int " bufsiz ", int " offset ", int " scale ); .SH BESCHREIBUNG Unter Linux 0.99.11 ist .I profil nicht im Kernel implementiert. Stattdessen bieten die DLL 4.4.1 eine Implementation im User-Space. .I Buf zeigt auf .I bufsiz bytes des Kernels. Alle virtuelle 10 Millisekunden wird der Programmzähler (PC) des Benutzers überprüft. .I Offset wird abgezogen und das Ergebnis wird mit .IR scale mulipliziert. Wenn diese Adresse in .IR buf liegt, dann wird die darauf zeigende Variable hochgezählt. Wenn .I scale kleiner als 2 ist oder .I bufsiz gleich 0 ist, wird profiling verboten. .SH "RÜCKGABEWERT" Null wird immer zurückgegeben. .SH FEHLER .B Profil kann nicht in einem Programm benutzt werden, das auch .B ITIMER_PROF itimer benutzt. Wird .B profil mit einem ungültigen .I buf aufgerufen, erzeugt es ein core dump. Echtes Kernelprofiling erzeugt genauere Resultate. .SH "SIEHE AUCH" .BR gprof (1), .BR setitimer (2), .BR signal (2), .BR sigaction (2).