Skip to content

Conversation

@tommcdon
Copy link
Member

Description

Perfmaps and Jitdumps is a Linux kernel feature that allows .NET to symbolicate dynamically generated code with perf_events. The perfmap/jitdump files are processed by the the Linux perf tool to generate human readable callstacks for CPU traces, for example. The Linux implementation looks for the perfmap/jitdump files in /tmp (please see https://elixir.bootlin.com/linux/v6.4.3/source/tools/perf/util/symbol.c#L1838). The .NET implementation defaults to writing to /tmp but this can be overridden with the $TMPDIR environment variable. This leads to incorrect behavior in environments where $TMPDIR is in use. This code change alters the behavior and will use /tmp regardless of $TMPDIR settings. There is a minor fix included with this change that correctly sets perfmap location if DOTNET_PerfMapJitDumpPath is set.

This is a port of #88776 from .NET 8

Customer Impact

Internal partner teams have requested this change in .NET servicing

Regression?

Not a regression

Risk

Low, perfmaps+jitdumps is opt-in feature and we are only changing the default location where they are being written to

@tommcdon tommcdon added Servicing-consider Issue for next servicing release review area-Tracing-coreclr labels Jul 17, 2023
@tommcdon tommcdon added this to the 7.0.x milestone Jul 17, 2023
@ghost ghost assigned tommcdon Jul 17, 2023
Copy link
Member

@jeffschwMSFT jeffschwMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

approved. we will take for consideration in 7.0.x. please get codereview

@rbhanda rbhanda modified the milestones: 7.0.x, 7.0.11 Jul 20, 2023
@rbhanda rbhanda added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Jul 20, 2023
@tommcdon tommcdon merged commit a6b4969 into dotnet:release/7.0-staging Jul 29, 2023
@radical radical mentioned this pull request Aug 3, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Aug 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-Tracing-coreclr Servicing-approved Approved for servicing release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants