From owner-freebsd-chat@freebsd.org Thu Feb 14 09:50:35 2019 Return-Path: Delivered-To: freebsd-chat@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9E8F514F11BA for ; Thu, 14 Feb 2019 09:50:35 +0000 (UTC) (envelope-from bch@online.de) Received: from mout.kundenserver.de (mout.kundenserver.de [212.227.17.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mout.kundenserver.de", Issuer "TeleSec ServerPass DE-2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 3D8CC6801A for ; Thu, 14 Feb 2019 09:50:33 +0000 (UTC) (envelope-from bch@online.de) Received: from online.de ([87.150.247.247]) by mrelayeu.kundenserver.de (mreue109 [212.227.15.183]) with ESMTPSA (Nemesis) id 1Mj8eB-1hWZ5W2KYP-00f9ct for ; Thu, 14 Feb 2019 10:50:31 +0100 Received: from x230.onfire.org (localhost [127.0.0.1]) by online.de (Postfix) with ESMTP id 214ED6203B for ; Thu, 14 Feb 2019 10:50:31 +0100 (CET) From: Christian Barthel To: freebsd-chat@freebsd.org Subject: siginfo_t content Date: Thu, 14 Feb 2019 10:50:31 +0100 Message-ID: <875ztmitqw.fsf@x230.onfire.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (berkeley-unix) MIME-Version: 1.0 Content-Type: text/plain X-Provags-ID: V03:K1:V00+EHuQy2i8QRILn1Y/3mBHtiucuuA6rZHk/AzTtmhoGuSAxjT GZqYCLmsaF4mOey5noPUHYtHWVUkiunfu1lISYIcfF8XXcL5EqdqaxahUbcTqdYxS/zjPxx tFtfeLvlxcVJxUGr9+/Rjr/yWQK0G8mbL6GUdg8wXD7d5HeKPU3arAIjvfUAebUGt78vkYh VvfdY3E+YQ/u3ilGjmvkw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:6gyEdr7IHxw=:ACrzzeeCCpxotPDHHQOdqS mBmRkrvMGHRcTRhdotsM44V6Bd/LcfWNrqW8kcKmHD4iGqn8ice9JbxfHC1y8ZAq9ZCab4s0e 65+6ywn09f3vYGzncbw3w+5mQtq7YhV4doHY06Do/rN9jbGlS7kSWlwosRatucoiWirQxMypU ww61cJ1ZuE1obwNHTO6IbPXHXxadMF7HsuH0RWnKkzJSFhAAWYDl5ByIqlmqKOP1f+ibuxGlR IK3OwS3neOR3rhAh1gIkKCOLtv7C43WQe+Thrb7KG0V9c+9j+7b0ugX1U0X1I9bQBMooMSIAC Tc4jUeNebiRO3AGnXSPytHLlzA03PGMBfqzblqLSNdfxD7lIDmFHPhWZPkcr0eEUYaZp4Vdo/ ld0Ln4LEcGEGdVYMTOhpscPmLV2pwds1zIM8rtPgw7zQKDLFA2LwWg6lDCamXZiXMW44Qry0P ggIPG24DPRIsMKEy7tdXtwSWsns6LGLQzq2qwgwkl0aNuIMS7sexXLqjmEkxtc2zhxISLs8Wz TABA/KgyD3sCOyyGFZd7tpC0v8rOrTrJJQYxzfN1Tm714/wqL6DLflo3VAwfhr+WaLXpsNYEu CcQ4JYV9R6Ej+am6CS+nu2oqmRu4B6d/78PNmnBCOHEurIpfT3VORNWhRfb47DifrfJlJ51F6 OPmxVIGk12t2ZdwwZsSjobldXGxJ5P06N2qKapxfpg6ty1hozjlTlRbQ95FGRkC4E84w5UFjB c2Ai7mpm0RlIgL0Y7GZY07z1BDMNrmIgHLniPmFjQtNEfHQXqnwIAtY0/ZQ= X-Rspamd-Queue-Id: 3D8CC6801A X-Spamd-Bar: +++ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [3.36 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; RWL_MAILSPIKE_POSSIBLE(0.00)[10.17.227.212.rep.mailspike.net : 127.0.0.17]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_SPAM_SHORT(0.75)[0.746,0]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-chat@freebsd.org]; TO_DN_NONE(0.00)[]; AUTH_NA(1.00)[]; RCPT_COUNT_ONE(0.00)[1]; RCVD_COUNT_THREE(0.00)[3]; DMARC_NA(0.00)[online.de]; MX_GOOD(-0.01)[cached: mx00.emig.kundenserver.de]; NEURAL_SPAM_LONG(0.67)[0.668,0]; RCVD_IN_DNSWL_NONE(0.00)[10.17.227.212.list.dnswl.org : 127.0.5.0]; NEURAL_SPAM_MEDIUM(0.82)[0.818,0]; R_SPF_NA(0.00)[]; RECEIVED_SPAMHAUS_PBL(0.00)[247.247.150.87.zen.spamhaus.org : 127.0.0.10]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:8560, ipnet:212.227.0.0/16, country:DE]; RCVD_TLS_LAST(0.00)[]; IP_SCORE(0.24)[ipnet: 212.227.0.0/16(-0.77), asn: 8560(1.95), country: DE(-0.01)]; FROM_EQ_ENVFROM(0.00)[] X-BeenThere: freebsd-chat@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Non technical items related to the community List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Feb 2019 09:50:36 -0000 Hello, I am interested in the historical development of the siginfo_t record. I hope, this is the correct mailinglist and there are still readers on it. I've tried to write a very simple and minimalistic profiler for a single threaded application by using setitimer(2) and SIGPROF signal. When using the extended signal handler code described in the EXAMPLES section of sigaction(2), I can access the faulting code and the type of the signal by using `struct siginfo`: File: struct siginfo_t *info { .... int si_code; /* signal code */ void *si_addr; /* faulting instruction */ .... } I've noticed that the si_code is always set to be SI_KERNEL and the si_addr to be 0x0. Is there a specific reason for this? I thought that the SIGPROF signal would be of type SI_TIMER. After reading through the kernel sources, I've manipulated the returned structure a bit and attached the patch to clarify what I am meaning (I've just used the program counter of the first thread which is not correct if there are multiple threads). Kind regards, -- Christian Barthel