From owner-freebsd-hackers Tue May 22 1:17:55 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from roura.ac.upc.es (roura.ac.upc.es [147.83.33.10]) by hub.freebsd.org (Postfix) with ESMTP id A025037B422 for ; Tue, 22 May 2001 01:17:50 -0700 (PDT) (envelope-from oscar@ac.upc.es) Received: from ac.upc.es (fonoll.ac.upc.es [147.83.32.14]) by roura.ac.upc.es (8.11.0/8.11.0) with ESMTP id f4M8Hg419389 for ; Tue, 22 May 2001 10:17:42 +0200 (MET DST) Message-ID: <3B0A20A7.223237B9@ac.upc.es> Date: Tue, 22 May 2001 10:17:43 +0200 From: Oscar-Ivan Lepe-Aldama Organization: DAC/UPC X-Mailer: Mozilla 4.76 [en] (X11; U; SunOS 5.7 sun4u) X-Accept-Language: es, en MIME-Version: 1.0 To: hackers@freebsd.org Subject: Perfmon device Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi, I sent this question to freebsd-questions but haven't got any answer, yet. That is why I'm now trying here. Here is my question. I have noticed that every time the perfmon device is closed it shuts down the PMECs. While I can see this is appropriate for some applications, it is not for mine. I'm using the PMECs for measuring the performance of some in-kernel networking routines. It would be very useful for me to be able to use the perfmon device just for configuring the PMECs. But as it is distributed this is not possible. I see two solutions to this. One is to extend the device's implementation for supporting a "close without stopping" ioctl command. Because this implies knowing the details of the device's driver, and because right now I need a fast solution, I cannot do this. The other is a brute force (and naive, if you will) solution; that is, eliminate the code in perfmon_close() that shuts down the PMECs. This code seams to be at perfmon_fini(), where perfmon_stop() is called and perfmon_inuse is updated. However, I do not want to do this until I'm sure such a change is safe. So my question is, can I do such a change an still get a working device? If no, is there some other way to accomplish this? Other derived questions. Is there some other way for on-line configuring the PMECs? Any comment on the proposed extension for the device? TIA, -- ======================================================================== 0 0 0 Oscar-Ivan Lepe-Aldama | UPC-Campus Nord, DAC 0 0 0 e-mail: oscar@ac.upc.es | Modul D6, despatx 116 0 0 0 phone: +34 93 401 7187 | Jordi Girona, 1-3 U P C fax: +34 93 401 7055 | 08034 Barcelona - SPAIN WWW: http://people.ac.upc.es/homes/oscar/ ======================================================================== To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message