PERFORCE change 123520 for review
Garrett Cooper
gcooper at FreeBSD.org
Sun Jul 15 06:08:09 UTC 2007
http://perforce.freebsd.org/chv.cgi?CH=123520
Change 123520 by gcooper at optimus-revised_pkgtools on 2007/07/15 06:07:59
Converted profiling statements from printf(...) to fprintf(stderr, ...).
Not doing this will stimulate what I believe is a bug in pkg_add (doubles / triples the number of iterations I've seen in adding some packages like x11-libs/atk).
It may be a design choice though made by the original author given recent questions I've seen crop up on ports at .
Need to talk to mentor (krion) about it.
Affected files ...
.. //depot/projects/soc2007/revised_fbsd_pkgtools/usr/src/usr.sbin/pkg_install/add/extract.c#3 edit
.. //depot/projects/soc2007/revised_fbsd_pkgtools/usr/src/usr.sbin/pkg_install/lib/pen.c#4 edit
.. //depot/projects/soc2007/revised_fbsd_pkgtools/usr/src/usr.sbin/pkg_install/lib/plist.c#9 edit
Differences ...
==== //depot/projects/soc2007/revised_fbsd_pkgtools/usr/src/usr.sbin/pkg_install/add/extract.c#3 (text+ko) ====
==== //depot/projects/soc2007/revised_fbsd_pkgtools/usr/src/usr.sbin/pkg_install/lib/pen.c#4 (text+ko) ====
@@ -32,7 +32,6 @@
static char PenLocation[FILENAME_MAX];
static char Previous[FILENAME_MAX];
-#if SIMPLE_PROF_TRY
char *
run_generic_playpen_prof(char *fn_name, ...)
{
@@ -73,12 +72,11 @@
time_diff.tv_sec = after.tv_sec - before.tv_sec;
- printf( "(%s) Difference: %3.20lf secs\n", fn_name, (double) ( time_diff.tv_sec + time_diff.tv_nsec/1e9 ) );
+ fprintf(stderr, "(%s) Difference: %3.20lf secs\n", fn_name, (double) ( time_diff.tv_sec + time_diff.tv_nsec/1e9 ) );
return ret_string;
}
-#endif
char *
where_playpen(void)
@@ -88,7 +86,6 @@
static char *
find_playpen(char *pen, off_t sz) {
-#if SIMPLE_PROF_TRY
return run_generic_playpen_prof("find_playpen", pen, sz);
}
@@ -96,8 +93,6 @@
char *
find_playpen_np(char *pen, off_t sz)
{
-#endif
-
char *cp;
struct stat sb;
@@ -150,7 +145,6 @@
char *
make_playpen(char *pen, off_t sz)
{
-#if SIMPLE_PROF_TRY
return run_generic_playpen_prof("make_playpen", pen, sz);
}
@@ -161,8 +155,6 @@
char *
make_playpen_np(char *pen, off_t sz)
{
-#endif
-
if (!find_playpen(pen, sz))
return NULL;
@@ -207,7 +199,6 @@
void
leave_playpen()
{
-#if SIMPLE_PROF_TRY
run_generic_playpen_prof("leave_playpen");
}
@@ -215,8 +206,6 @@
void
leave_playpen_np()
{
-#endif
-
void (*oldsig)(int);
/* Don't interrupt while we're cleaning up */
==== //depot/projects/soc2007/revised_fbsd_pkgtools/usr/src/usr.sbin/pkg_install/lib/plist.c#9 (text+ko) ====
More information about the p4-projects
mailing list