Bug 1377651 Make vtune variable non-static so it may be used in a non-static function draft
authorTom Ritter <tom@mozilla.com>
Wed, 05 Jul 2017 07:12:45 -0500
changeset 604144 49006c0cc53ee6a288c574cef4b886e1b9f4b757
parent 603441 0c90918b2ee755b0306647a0ca42f8341a7ffc67
child 636102 2e1363490e078d160ca020872766161ba7830acf
push id66974
push userbmo:tom@mozilla.com
push dateWed, 05 Jul 2017 12:13:32 +0000
bugs1377651
milestone56.0a1
Bug 1377651 Make vtune variable non-static so it may be used in a non-static function MozReview-Commit-ID: IlpSsMH7mq0
js/src/vtune/README
js/src/vtune/ittnotify.h
--- a/js/src/vtune/README
+++ b/js/src/vtune/README
@@ -9,11 +9,13 @@ To update these files, copy the followin
 
 Additionally, the following changes should be propagated:
 
     - Some static functions should be exported for use in VTuneWrapper.cpp.
     - Per Bug 1339190, all instances of "__attribute__((weak))" must be removed,
       or Ubuntu shell builds will randomly crash on startup.
     - With weak attributes removed, DL_SYMBOLS and PTHREAD_SYMBOLS should
       be defined as "(1)" to avoid -Waddress warnings.
+    - Per Bug 1377651, the __itt_null variable in ittnotify.h should be
+      made non-static, so it can be used in a non-static function.
 
 If the license has changed, update the "VTune License" section of
     toolkit/content/license.html
--- a/js/src/vtune/ittnotify.h
+++ b/js/src/vtune/ittnotify.h
@@ -1807,17 +1807,17 @@ ITT_STUB(ITTAPI, __itt_domain*, domain_c
 typedef struct ___itt_id
 {
     unsigned long long d1, d2, d3;
 } __itt_id;
 
 #pragma pack(pop)
 /** @endcond */
 
-static const __itt_id __itt_null = { 0, 0, 0 };
+const __itt_id __itt_null = { 0, 0, 0 };
 
 /**
  * @ingroup ids
  * @brief A convenience function is provided to create an ID without domain control.
  * @brief This is a convenience function to initialize an __itt_id structure. This function
  * does not affect the collector runtime in any way. After you make the ID with this
  * function, you still must create it with the __itt_id_create function before using the ID
  * to identify a named entity.