This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Profiling - make TFTP port configurable


Index: services/profile/gprof/current/ChangeLog
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/services/profile/gprof/current/ChangeLog,v
retrieving revision 1.2
diff -u -5 -p -r1.2 ChangeLog
--- services/profile/gprof/current/ChangeLog	15 Nov 2002 14:32:33 -0000	1.2
+++ services/profile/gprof/current/ChangeLog	15 Nov 2002 15:01:43 -0000
@@ -1,8 +1,11 @@
 2002-11-15  Gary Thomas  <gthomas@ecoscentric.com>
 
 	* src/profile.c: 
+	* cdl/profile_gprof.cdl: Allow TFTP port number to be configured.
+
+	* src/profile.c: 
 	* include/profile.h: Add proper C++ protections.  Change timer
 	callback function to be __profile_hit() - less polluting.
 
 	* doc/profile.sgml: New file.
 
Index: services/profile/gprof/current/cdl/profile_gprof.cdl
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/services/profile/gprof/current/cdl/profile_gprof.cdl,v
retrieving revision 1.1
diff -u -5 -p -r1.1 profile_gprof.cdl
--- services/profile/gprof/current/cdl/profile_gprof.cdl	15 Nov 2002 00:27:23 -0000	1.1
+++ services/profile/gprof/current/cdl/profile_gprof.cdl	15 Nov 2002 15:00:41 -0000
@@ -71,10 +71,20 @@ cdl_package CYGPKG_PROFILE_GPROF {
         description "
 	  Profiling requires access to a high resolution timer which
           is platform dependent."
     }
 
+    cdl_option CYGNUM_PROFILE_TFTP_PORT {
+        display       "Port used by TFTP server for profile data"
+        flavor        data
+        default_value 0
+        description   "
+            This option sets the port number to use for the TFTP server
+            which exports the profiling data.  A value of 0 will set
+            the port to be the IETF standard port of 69/udp."
+    }
+
     cdl_option CYGPKG_PROFILE_TESTS {
         display "Profiling tests"
         flavor  data   
         no_define      
         calculated { "tests/profile.c" }
Index: services/profile/gprof/current/src/profile.c
===================================================================
RCS file: /misc/cvsfiles/ecos/packages/services/profile/gprof/current/src/profile.c,v
retrieving revision 1.2
diff -u -5 -p -r1.2 profile.c
--- services/profile/gprof/current/src/profile.c	15 Nov 2002 14:32:34 -0000	1.2
+++ services/profile/gprof/current/src/profile.c	15 Nov 2002 15:00:41 -0000
@@ -236,7 +236,7 @@ profile_on(void *_start, void *_end, int
                 start_addr, end_addr, _end, num_buckets, bucket_size);
 
     hal_enable_profile_timer(resolution);
 
     // Create a TFTP server to provide the data
-    tftp_server_id = tftpd_start(0, &profile_fileops);
+    tftp_server_id = tftpd_start(CYGNUM_PROFILE_TFTP_PORT, &profile_fileops);
 }


-- 
------------------------------------------------------------
Gary Thomas                  |
eCosCentric, Ltd.            |  
+1 (970) 229-1963            |  eCos & RedBoot experts
gthomas@ecoscentric.com      |
http://www.ecoscentric.com/  |
------------------------------------------------------------


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]