* [PATCH] lk 2.5.3 scsi generic (sg) driver
@ 2002-02-02 17:14 Douglas Gilbert
2002-02-05 23:20 ` gprof / profiling support ? Dave Francheski
0 siblings, 1 reply; 3+ messages in thread
From: Douglas Gilbert @ 2002-02-02 17:14 UTC (permalink / raw)
To: linux-scsi, linux-kernel, Dave Jones
In lk 2.5.3 the sg driver tries to set up both address
and page+offset in scatterlist entries. Unfortunately
asm-i386/pci.h's pci_map_sg() contains this check:
if (sg[i].address && sg[i].page)
BUG();
which kills that strategy when the sym53c8xx driver
uses pci_map_sg(). This patch has been posted earlier
for lk 2.5.3-pre5 and is still required for lk 2.5.3
Doug Gilbert
--- linux/drivers/scsi/sg.c Thu Jan 24 18:45:01 2002
+++ linux/drivers/scsi/sg.c3523 Thu Jan 24 20:53:28 2002
@@ -19,7 +19,7 @@
*/
#include <linux/config.h>
#ifdef CONFIG_PROC_FS
- static char sg_version_str[] = "Version: 3.5.23 (20020103)";
+ static char sg_version_str[] = "Version: 3.5.23 (20020124)";
#endif
static int sg_version_num = 30523; /* 2 digits for each component */
/*
@@ -76,7 +76,7 @@
#include <linux/version.h>
#endif /* LINUX_VERSION_CODE */
-#define SG_STILL_HAVE_ADDRESS_IN_SCATTERLIST
+/* #define SG_STILL_HAVE_ADDRESS_IN_SCATTERLIST */
#define SG_ALLOW_DIO_DEF 0
#define SG_ALLOW_DIO_CODE /* compile out be commenting this define */
^ permalink raw reply [flat|nested] 3+ messages in thread* gprof / profiling support ? 2002-02-02 17:14 [PATCH] lk 2.5.3 scsi generic (sg) driver Douglas Gilbert @ 2002-02-05 23:20 ` Dave Francheski 2002-02-06 20:09 ` Jakob Østergaard 0 siblings, 1 reply; 3+ messages in thread From: Dave Francheski @ 2002-02-05 23:20 UTC (permalink / raw) To: linux-kernel; +Cc: davef I'm trying to profile an application using the 'gprof' utility, and in particular get timing information from the profile. For some reason, the output from gprof displays "no time accumulated" and I see no cumulative/self seconds at all. However, all of the call counts appear to be correct. I suspect that the sampling rate using by gprof/linux is simply two slow, given the particular application I'm running. Can anybody help me obtain timing information from gprof and/or point me to a better source for application profiling in general? Thankyou for your support. David Francheski ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: gprof / profiling support ? 2002-02-05 23:20 ` gprof / profiling support ? Dave Francheski @ 2002-02-06 20:09 ` Jakob Østergaard 0 siblings, 0 replies; 3+ messages in thread From: Jakob Østergaard @ 2002-02-06 20:09 UTC (permalink / raw) To: Dave Francheski; +Cc: linux-kernel On Tue, Feb 05, 2002 at 03:20:47PM -0800, Dave Francheski wrote: > I'm trying to profile an application > using the 'gprof' utility, and in particular > get timing information from the profile. > > For some reason, the output from gprof > displays > > "no time accumulated" > > and I see no cumulative/self seconds > at all. However, all of the call counts > appear to be correct. > > I suspect that the sampling rate using > by gprof/linux is simply two slow, given > the particular application I'm running. > > Can anybody help me obtain timing information > from gprof and/or point me to a better > source for application profiling in general? This is way OT for linux-kernel, but here goes: If you application runs for a very short amount of time (say, less than a second) the profile will probably be dominated by glibc startup, application initializations and exit routines. It's useless. That you don't have time accumulated is the least of your problems - even with the times, your profile would be random numbers and random function names. In order to profile *anything* - you should make sure that it runs for a while (I would say minutes at least, but it depends very much on the complexity of your application, eg. number of functions involved, and how their run-time is affected by data input and the environment (timing-sensitive threaded applications etc.)). You simply need a good data sample, otherwise any data you have will be dominated by noise, and your profile will be random. If it's a very small computational routine, simply put it in a for (int i = 0; i != 100000; i++) { ... } -- ................................................................ : jakob@unthought.net : And I see the elder races, : :.........................: putrid forms of man : : Jakob Østergaard : See him rise and claim the earth, : : OZ9ABN : his downfall is at hand. : :.........................:............{Konkhra}...............: ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2002-02-06 20:09 UTC | newest] Thread overview: 3+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2002-02-02 17:14 [PATCH] lk 2.5.3 scsi generic (sg) driver Douglas Gilbert 2002-02-05 23:20 ` gprof / profiling support ? Dave Francheski 2002-02-06 20:09 ` Jakob Østergaard
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox