Home | History | Annotate | Line # | Download | only in common
      1 /* Copyright (C) 2021-2026 Free Software Foundation, Inc.
      2    Contributed by Oracle.
      3 
      4    This file is part of GNU Binutils.
      5 
      6    This program is free software; you can redistribute it and/or modify
      7    it under the terms of the GNU General Public License as published by
      8    the Free Software Foundation; either version 3, or (at your option)
      9    any later version.
     10 
     11    This program is distributed in the hope that it will be useful,
     12    but WITHOUT ANY WARRANTY; without even the implied warranty of
     13    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     14    GNU General Public License for more details.
     15 
     16    You should have received a copy of the GNU General Public License
     17    along with this program; if not, write to the Free Software
     18    Foundation, 51 Franklin Street - Fifth Floor, Boston,
     19    MA 02110-1301, USA.  */
     20 
     21 #ifndef _EXPERIMENT_H
     22 #define _EXPERIMENT_H
     23 
     24 /* version numbers define experiment format */
     25 #define SUNPERF_VERNUM          12
     26 #define SUNPERF_VERNUM_MINOR    4
     27 
     28 /* backward compatibility down to: */
     29 #define SUNPERF_VERNUM_LEAST    12
     30 
     31 #include "Emsgnum.h" /* for COL_ERROR_*, etc. symbols */
     32 
     33 #define SP_GROUP_HEADER         "#analyzer experiment group"
     34 
     35 /* Experiment name macro definitions */
     36 
     37 /* for descendant experiments */
     38 #define DESCENDANT_EXPT_KEY     ".er/_"
     39 #define IS_DESC_EXPT(exptname)  (strstr(exptname,DESCENDANT_EXPT_KEY) != NULL)
     40 #define IS_FNDR_EXPT(exptname)  (strstr(exptname,DESCENDANT_EXPT_KEY) == NULL)
     41 
     42 // environment variables that must be forwarded to libcollector
     43 #define SP_COLLECTOR_PARAMS         "SP_COLLECTOR_PARAMS"
     44 #define SP_COLLECTOR_EXPNAME        "SP_COLLECTOR_EXPNAME"
     45 #define SP_COLLECTOR_FOLLOW_SPEC    "SP_COLLECTOR_FOLLOW_SPEC"
     46 #define SP_COLLECTOR_FOUNDER        "SP_COLLECTOR_FOUNDER"
     47 #define SP_PRELOAD_STRINGS          "SP_COLLECTOR_PRELOAD"
     48 #define LD_PRELOAD_STRINGS          "LD_PRELOAD"
     49 #define SP_LIBPATH_STRINGS          "SP_COLLECTOR_LIBRARY_PATH"
     50 #define LD_LIBPATH_STRINGS          "LD_LIBRARY_PATH"
     51 #define JAVA_TOOL_OPTIONS           "JAVA_TOOL_OPTIONS"
     52 #define COLLECTOR_JVMTI_OPTION      "-agentlib:gp-collector"
     53 #define LIBGP_COLLECTOR             "libgp-collector.so"
     54 #define GPROFNG_PRELOAD_LIBDIRS     "GPROFNG_PRELOAD_LIBDIRS"
     55 #define SP_COLLECTOR_ORIGIN_COLLECT "SP_COLLECTOR_ORIGIN_COLLECT"
     56 #define SP_COLLECTOR_DEBUG          "SP_COLLECTOR_DEBUG"
     57 #define SP_COLLECTOR_TRACELEVEL     "SP_COLLECTOR_TRACELEVEL"
     58 
     59 /* File name definitions */
     60 #define SP_ARCHIVES_DIR         "archives"
     61 #define SP_ARCHIVE_LOG_FILE     "archive.log"
     62 #define SP_LOG_FILE             "log.xml"
     63 #define SP_NOTES_FILE           "notes"
     64 #define SP_IFREQ_FILE           "ifreq"
     65 #define SP_MAP_FILE             "map.xml"
     66 #define SP_LABELS_FILE          "labels.xml"
     67 #define SP_DYNTEXT_FILE         "dyntext"
     68 #define SP_OVERVIEW_FILE        "overview"
     69 #define SP_PROFILE_FILE         "profile"
     70 #define SP_SYNCTRACE_FILE       "synctrace"
     71 #define SP_IOTRACE_FILE         "iotrace"
     72 #define SP_OMPTRACE_FILE        "omptrace"
     73 #define SP_MPVIEW_FILE          "mpview.dat3"
     74 #define SP_HWCNTR_FILE          "hwcounters"
     75 #define SP_HEAPTRACE_FILE       "heaptrace"
     76 #define SP_JCLASSES_FILE        "jclasses"
     77 #define SP_DYNAMIC_CLASSES      "jdynclasses"
     78 #define SP_RACETRACE_FILE       "dataraces"
     79 #define SP_DEADLOCK_FILE        "deadlocks"
     80 #define SP_FRINFO_FILE          "frameinfo"
     81 #define SP_WARN_FILE            "warnings.xml"
     82 
     83 #define SP_LIBCOLLECTOR_NAME    "libgp-collector.so"
     84 #define SP_LIBAUDIT_NAME        "libcollect-ng.so"
     85 
     86 /* XML tags */
     87 #define SP_TAG_COLLECTOR        "collector"
     88 #define SP_TAG_CPU              "cpu"
     89 #define SP_TAG_DATAPTR          "dataptr"
     90 #define SP_TAG_EVENT            "event"
     91 #define SP_TAG_EXPERIMENT       "experiment"
     92 #define SP_TAG_FIELD            "field"
     93 #define SP_TAG_PROCESS          "process"
     94 #define SP_TAG_PROFILE          "profile"
     95 #define SP_TAG_PROFDATA         "profdata"
     96 #define SP_TAG_PROFPCKT         "profpckt"
     97 #define SP_TAG_SETTING          "setting"
     98 #define SP_TAG_STATE            "state"
     99 #define SP_TAG_SYSTEM           "system"
    100 #define SP_TAG_POWERM           "powerm"
    101 #define SP_TAG_FREQUENCY        "frequency"
    102 #define SP_TAG_DTRACEFATAL      "dtracefatal"
    103 
    104 /* records for log and loadobjects files */
    105 /* note that these are in alphabetical order */
    106 #define SP_JCMD_ARCHIVE         "archive_run"
    107 #define SP_JCMD_BLKSZ           "blksz"
    108 #define SP_JCMD_CERROR          "cerror"
    109 #define SP_JCMD_COLLENV         "collenv"
    110 #define SP_JCMD_COMMENT         "comment"
    111 #define SP_JCMD_CWARN           "cwarn"
    112 #define SP_JCMD_DELAYSTART      "delay_start"
    113 #define SP_JCMD_DESC_START      "desc_start"
    114 #define SP_JCMD_DESC_STARTED    "desc_started"
    115 #define SP_JCMD_EXEC_START      "exec_start"
    116 #define SP_JCMD_EXEC_ERROR      "exec_error"
    117 #define SP_JCMD_EXIT            "exit"
    118 #define SP_JCMD_FAKETIME        "faketime"
    119 #define SP_JCMD_HEAPTRACE       "heaptrace"
    120 #define SP_JCMD_HWC_DEFAULT     "hwc_default"
    121 #define SP_JCMD_HW_COUNTER      "hwcounter"
    122 #define SP_JCMD_IOTRACE         "iotrace"
    123 #define SP_JCMD_JTHREND         "jthread_end"
    124 #define SP_JCMD_JTHRSTART       "jthread_start"
    125 #define SP_JCMD_GCEND           "gc_end"
    126 #define SP_JCMD_GCSTART         "gc_start"
    127 #define SP_JCMD_JVERSION        "jversion"
    128 #define SP_JCMD_LIMIT           "limit"
    129 #define SP_JCMD_LINETRACE       "linetrace"
    130 #define SP_JCMD_NOIDLE          "noidle"
    131 #define SP_JCMD_PAUSE           "pause"
    132 #define SP_JCMD_PAUSE_SIG       "pause_signal"
    133 #define SP_JCMD_PROFILE         "profile"
    134 #define SP_JCMD_RESUME          "resume"
    135 #define SP_JCMD_RUN             "run"
    136 #define SP_JCMD_SAMPLE          "sample"
    137 #define SP_JCMD_SAMPLE_PERIOD   "sample_period"
    138 #define SP_JCMD_SAMPLE_SIG      "sample_signal"
    139 #define SP_JCMD_SRCHPATH        "search_path"
    140 #define SP_JCMD_STACKBASE       "stackbase"
    141 #define SP_JCMD_SYNCTRACE       "synctrace"
    142 #define SP_JCMD_TERMINATE       "terminate"
    143 #define SP_JCMD_THREAD_PAUSE    "thread_pause"
    144 #define SP_JCMD_THREAD_RESUME   "thread_resume"
    145 #define SP_JCMD_VERSION         "version"
    146 
    147 /* strings naming memory-segments */
    148 #define SP_MAP_HEAP             "Heap"
    149 #define SP_MAP_STACK            "Stack"
    150 #define SP_MAP_SHMEM            "SHMid"
    151 #define SP_MAP_UNRESOLVABLE     "Unresolvable"
    152 
    153 #define SP_UNKNOWN_NAME         "(unknown)"
    154 
    155 #define MAX_STACKDEPTH 2048
    156 #endif /* _EXPERIMENT_H */
    157