)]}'
{
  "commit": "df9859418359cd83241ceea1f512f89f5cf0afd3",
  "tree": "5ab9ef85668048e4ed84c06cd7b000722398d8ae",
  "parents": [
    "c953fe86fac6368f7934941ae31d372d097aa426"
  ],
  "author": {
    "name": "Indu Bhagat",
    "email": "indu.bhagat@oracle.com",
    "time": "Thu Jan 15 16:42:21 2026 -0800"
  },
  "committer": {
    "name": "Indu Bhagat",
    "email": "indu.bhagat@oracle.com",
    "time": "Thu Jan 15 17:02:25 2026 -0800"
  },
  "message": "[SFrame-V3] include: sframe: reserve 5 bits for new FDE types\n\nIn SFrame V2, the FDE representation caters to the most common cases of\nstack trace metadata:\n  - CFA is SP/FP based,\n  - FP/RA offsets, if present are CFA based (except some cases in s390x\n    where reg can be encoded).\n\nIntroduce an additional FDE type SFRAME_FDE_TYPE_FLEX, which can encode\na more flexible set of CFA, FP and RA recovery rules.  Some of the\npatterns supported include:\n  - CFA may be non-SP/FP based.\n  - CFA, FP may encode dereferencing of register after offset adjustment\n  - RA may be in a non-default register.\n\nThe important bit here is that since SFrame does not track all\ncallee-saved registers, the above-mentioned recovery rules must only be\ndone for topmost frames (by the stack tracer).\n\nAdding a new FDE type does have implications for a stack tracer in that\nit needs to:\n  - Check the FDE type before interpreting the variable length bytes\n    trailing the SFrame FRE header as stack offsets.\n  - If the FDE type is SFRAME_FDE_TYPE_FLEX, and the\n    recovery rules employ the use of any non-SP/FP based register, the\n    stack tracer must proceed only if it is the topmost frame on stack.\n\nFor CFA, RA, and FP, up to two \"offsets\" may be used.  The two offsets\nrepresent the information as follows:\n  - (minimum 8-bit) offset1 to encode register like:\n    (regnum \u003c\u003c 3) | unused \u003c\u003c 2 | deref \u003c\u003c 1 | reg_p (\u003d1)\n  - offset2 to encode offset: offset\n\nreg_p \u003d 1 indicates a register, reg_p \u003d 0 indicates CFA.\n\nThe offsets are in the usual order:  CFA, RA, FP if present.\n\nFor example, for FP/RA tracking,\n\na) If the reg is REG1 for FP/RA tracking,\n   - Encoding:\n     + offset1 to encode register: (REG1 \u003c\u003c 3) | unused \u003c\u003c 2 | deref \u003c\u003c 1 | reg_p (\u003d1)\n     + offset2 to encode offset: offset\n   - Action:\n     + if deref, FP/RA \u003d \\*(REG1 + offset) (e.g., seen for FP recovery\n       with certain DRAP patterns on x86_64)\n     + if no deref, FP/RA \u003d REG1 + offset\n\nb) If the reg is CFA for FP/RA tracking,\n   - Encoding:\n     + [\u003dEffectively Padding] offset1 to encode register:\n        (( 0 \u003c\u003c 3 ) | unused \u003c\u003c 2 | 0 \u003c\u003c 1 | reg_p (\u003d0))\n     + offset2 to encode offset: offset\n   - Action:\n     + if deref, FP/RA \u003d *(CFA + offset)\n     + if no deref, FP/RA \u003d CFA + offset (pattern shouldnt be seen for\n       RA)\n\nNext for CFA tracking,\n   - Action:\n     + if deref, CFA \u003d *(reg + offset) (e.g., seen for CFA recovery in\n       some stack realignment patterns on AMD64)\n     + if no deref, CFA \u003d reg + offset (e.g., for .cfi_def_cfa 2, 8, or\n       .cfi_def_cfa 10, 0)\n\nExpected usage of this FDE type is quite low (DRAP on x86_64).\n\nNB: In SFrame V2, we did use the the term \u0027FDE Type\u0027 for the two\ndesignated \u0027PC Type\u0027 for the SFrame FDEs (SFRAME_FDE_TYPE_PCINC,\nSFRAME_FDE_TYPE_PCMASK).  In hindsight, \u0027FDE Type\u0027 was inappropriate\nterm.  In a subsequent commit, we will fix this terminology for SFrame\nV3.\n\ninclude/\n\t* sframe.h (SFRAME_FDE_TYPE_FLEX): New SFrame FDE type.\n\t(SFRAME_V3_FDE_TYPE_MASK): New constant definition.\n\t(SFRAME_V3_FDE_TYPE): New macro definition.\n\t(SFRAME_V3_SET_FDE_TYPE): Likewise.\n\t(SFRAME_V3_FLEX_FDE_REG_ENCODE): Macro to encode register in the\n\tSFrame offset data.\n\t(SFRAME_V3_FLEX_FDE_OFFSET_REG_NUM): New definition.\n\t(SFRAME_V3_FLEX_FDE_OFFSET_REG_DEREF_P): Likewise.\n\t(SFRAME_V3_FLEX_FDE_OFFSET_REG_P): Likewise.\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "3b656663ce2da0e6e91a28ae7c473a7f04c39f31",
      "old_mode": 33188,
      "old_path": "include/sframe.h",
      "new_id": "cc439e5215444b008389f876cd87147b790bdb99",
      "new_mode": 33188,
      "new_path": "include/sframe.h"
    }
  ]
}
