Merge remote-tracking branch 'origin/light_property' 59/12659/1
Antoine ELIAS [Wed, 25 Sep 2013 12:50:28 +0000 (14:50 +0200)]
Change-Id: I565834fccd2107d5bc11a54c3a5e650b49026957

scilab/CHANGES_5.5.X
scilab/modules/core/includes/version.h.in
scilab/modules/core/includes/version.h.vc
scilab/modules/core/src/c/run.c
scilab/modules/functions/help/en_US/profiling/profile.xml
scilab/modules/functions/help/pt_BR/profiling/profile.xml

index 285aaa1..c635263 100644 (file)
@@ -288,6 +288,8 @@ Bug Fixes
 
 * Bug #6466 fixed - Example with vectorized input added in mprintf and msprintf help pages.
 
+* Bug #6638 fixed - The profiler output was incorrect by a factor of 1000 under Windows.
+
 * Bug #6693 fixed - modulo did not accept polynomial inputs. Help page was not updated.
 
 * Bug #6752 fixed - unit test scilab.tst has been split in different tests.
index d383022..d37b43a 100644 (file)
@@ -15,7 +15,7 @@
 #define SCI_VERSION_MAJOR @SCILAB_VERSION_MAJOR@
 #define SCI_VERSION_MINOR @SCILAB_VERSION_MINOR@
 #define SCI_VERSION_MAINTENANCE @SCILAB_VERSION_MAINTENANCE@
-#define SCI_VERSION_STRING "scilab-branch-light_property"
+#define SCI_VERSION_STRING "scilab-branch-master"
 /* SCI_VERSION_REVISION --> hash key commit */
 #define SCI_VERSION_REVISION 0
 #define SCI_VERSION_TIMESTAMP 0
@@ -25,7 +25,7 @@ void disp_scilab_version(void);
 /* for compatibility */
 /* Deprecated */
 #define SCI_VERSION SCI_VERSION_STRING
-#define DEFAULT_SCI_VERSION_MESSAGE "scilab-branch-light_property"
+#define DEFAULT_SCI_VERSION_MESSAGE "scilab-branch-master"
 
 #endif
 /*--------------------------------------------------------------------------*/
index a03a172..9efc548 100644 (file)
@@ -15,7 +15,7 @@
 #define SCI_VERSION_MAJOR 5
 #define SCI_VERSION_MINOR 5
 #define SCI_VERSION_MAINTENANCE 0
-#define SCI_VERSION_STRING "scilab-branch-light_property"
+#define SCI_VERSION_STRING "scilab-branch-master"
 /* SCI_VERSION_REVISION --> hash key commit */
 #define SCI_VERSION_REVISION 0
 #define SCI_VERSION_TIMESTAMP 0
@@ -25,7 +25,7 @@ void disp_scilab_version(void);
 /* for compatibility */
 /* Deprecated */
 #define SCI_VERSION SCI_VERSION_STRING
-#define DEFAULT_SCI_VERSION_MESSAGE "scilab-branch-light_property"
+#define DEFAULT_SCI_VERSION_MESSAGE "scilab-branch-master"
 
 
 #endif
index 2cef090..ab2684e 100644 (file)
@@ -1300,7 +1300,13 @@ L200:
     /*     profile */
     ++*istk(1 + lc);
     t = clock();
-    *istk(2 + lc) = *istk(2 + lc) + t - tref;
+    // clock() value on Windows is 1000 times less than on other OS
+    // profiling result unit of ms
+#ifdef _MSC_VER
+    *istk(2 + lc) = *istk(2 + lc) + (t - tref)*1000;
+#else
+    *istk(2 + lc) = *istk(2 + lc) + (t - tref);
+#endif
     tref = t;
     lc += 3;
     goto L10;
index 130d2a8..846fe28 100644 (file)
@@ -2,12 +2,13 @@
 <!--
  * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
  * Copyright (C) ????-2008 - INRIA
+ * Copyright (C) 2013 - Samuel GOUGEON : Specify unit of CPU time. Presentation of results c improved
  *
  * This file must be used under the terms of the CeCILL.
  * This source file is licensed as described in the file COPYING, which
  * you should have received as part of this distribution.  The terms
  * are also available at
- * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="profile">
             <varlistentry>
                 <term>c</term>
                 <listitem>
-                    <para>a nx3 matrix containig the execution profiles</para>
+                    <para>a nx3 matrix containing the execution profiles
+                        <itemizedlist>
+                            <listitem>
+                                <para>
+                                    <literal>c(i,1)</literal> : number of times the line #i of the function has been run
+                                </para>
+                            </listitem>
+                            <listitem>
+                                <para>
+                                    <literal>c(i,2)</literal> : cumulated CPU time [in seconds] spent to run the line #i
+                                </para>
+                            </listitem>
+                            <listitem>
+                                <para>
+                                    <literal>c(i,3)</literal> : Measurement of the interpreter effort to execute once the line #i [arbitrary unit]
+                                </para>
+                            </listitem>
+                        </itemizedlist>
+                    </para>
                 </listitem>
             </varlistentry>
         </variablelist>
@@ -44,7 +63,7 @@
         </para>
         <para>
             For such function, When such a function is executed the systems counts
-            how many time each line is executed and how may cpu time is spend for
+            how many time each line is executed and how may cpu time is spend [in s]for
             each line execution. These data are stored within the function data
             structure.  The profile function allows to extract these data and
             return them in the two first columns of <literal>c</literal>. The <literal>c</literal> third
index 9ec2e2c..905d8e0 100644 (file)
@@ -7,10 +7,10 @@
  * This source file is licensed as described in the file COPYING, which
  * you should have received as part of this distribution.  The terms
  * are also available at
- * http://www.cecill.info/licences/Licence_CeCILL_V2.1-en.txt
+ * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt
  *
  -->
-<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns4="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="profile" xml:lang="en">
+<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns4="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:id="profile" xml:lang="pt">
     <refnamediv>
         <refname>profile</refname>
         <refpurpose>extrai profiles (dossiês) de execução de uma função do