{"payload":{"feedbackUrl":"https://github.com/orgs/community/discussions/53140","repo":{"id":771732565,"defaultBranch":"main","name":"LinuxTracepoints-Net","ownerLogin":"microsoft","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2024-03-13T21:05:39.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/6154722?v=4","public":true,"private":false,"isOrgOwned":true},"refInfo":{"name":"","listCacheKey":"v0:1717441052.0","currentOid":""},"activityList":{"items":[{"before":"511b9d277f30ba209cfe23ec7d1b9999bb8f49b7","after":null,"ref":"refs/heads/PerfItemMetadata","pushedAt":"2024-06-03T18:57:32.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"idigdoug","name":"Doug Cook","path":"/idigdoug","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/45909143?s=80&v=4"}},{"before":"5f9ce0c1c20899fb0ef9ebb9a9436cbf35d05fe0","after":"4fb26206ca70caaea2151340027c17fa5aff330f","ref":"refs/heads/main","pushedAt":"2024-06-03T18:57:28.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"idigdoug","name":"Doug Cook","path":"/idigdoug","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/45909143?s=80&v=4"},"commit":{"message":"Fix PerfItemType problems (#16)\n\nWhile working on the Rust implementation of the decode library (using\r\nthe .NET implementation as reference material), I found some issues with\r\nthe .NET implementation.\r\n\r\n- Some comments have been messed up by Visual Studio's \"rename property\"\r\n helper when it was accidentally run with \"fix comments\" enabled.\r\n- Rust can't have properties named `type`, so I'm using `metadata`\r\n instead. While .NET allows properties named `Type`, I think `Metadata`\r\n is more accurate and descriptive, so update .NET to match.\r\n- Only one Array flag can be set at a time on the item metadata, so\r\n rename `ArrayFlags` to `ArrayFlag`.\r\n- It's really inconvenient and confusing to the user that the item info\r\n class doesn't track whether the item is an array or a scalar/element.\r\n It's bad in .NET, but even worse in Rust. We have a few bits free, so\r\n update the class to track this for the caller, and update the\r\n semantics of the class to match up with this new capability.\r\n\r\nEventHeaderEnumerator.cs:\r\n\r\n- Rename EventHeaderEnumerator.GetItemType() to GetItemMetadata().\r\n- Fix the ElementCount property for struct element items returned by\r\n GetItemMetadata() or GetItemInfo() -- they should have had\r\n ElementCount = 1, but instead they had ElementCount = ArrayLength.\r\n- \"Fix\" the handling of nul-terminated fields that don't have a\r\n nul-termination before the end of the event. Old behavior was to treat\r\n the field as invalid. New behavior is to consider them to end at the end\r\n of the event.\r\n\r\nEventHeaderItemInfo.cs:\r\n\r\n- Rename property `Type` to `Metadata`.\r\n\r\nPerfItemType.cs:\r\n\r\n- Future PR will rename this file to PerfItemMetadata.cs.\r\n- Rewrote the struct comment.\r\n- Renamed `PerfItemType` to `PerfItemMetadata`.\r\n- Rewrote the constructor comment.\r\n- Renamed property `EncodingAndArrayFlags` to\r\n `EncodingAndArrayFlagAndIsScalar` and made it private.\r\n- Renamed constructor parameter `encodingAndArrayFlags` to\r\n `encodingAndArrayFlag` since only one array flag can be set at a time.\r\n- Added constructor parameter `isScalar`. Value of this parameter gets\r\n stored in the ChainFlag bit of `EncodingAndArrayFlagAndIsScalar`.\r\n- Renamed property `ArrayFlags` to `ArrayFlag`.\r\n- Added properties `IsScalar` and `IsElement`.\r\n- Removed property `IsArrayOrElement`.\r\n\r\nPerfItemValue.cs:\r\n\r\n- Rewrote the struct comment.\r\n- Rewrote the constructor comment.\r\n- Renamed property `Type` to `Metadata`.\r\n- Add new method `AppendJsonTo()` which is possible because the metadata\r\n class now tracks `IsScalar`.","shortMessageHtmlLink":"Fix PerfItemType problems (#16)"}},{"before":"5f9ce0c1c20899fb0ef9ebb9a9436cbf35d05fe0","after":"511b9d277f30ba209cfe23ec7d1b9999bb8f49b7","ref":"refs/heads/PerfItemMetadata","pushedAt":"2024-05-28T02:12:51.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"idigdoug","name":"Doug Cook","path":"/idigdoug","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/45909143?s=80&v=4"},"commit":{"message":"Fix PerfItemType problems\n\nWhile working on the Rust implementation of the decode library (using\nthe .NET implementation as reference material), I found some issues with\nthe .NET implementation.\n\n- Some comments have been messed up by Visual Studio's \"rename property\"\n helper when it was accidentally run with \"fix comments\" enabled.\n- Rust can't have properties named `type`, so I'm using `metadata`\n instead. While .NET allows properties named `Type`, I think `Metadata`\n is more accurate and descriptive, so update .NET to match.\n- Only one Array flag can be set at a time on the item metadata, so\n rename `ArrayFlags` to `ArrayFlag`.\n- It's really inconvenient and confusing to the user that the item info\n class doesn't track whether the item is an array or a scalar/element.\n It's bad in .NET, but even worse in Rust. We have a few bits free, so\n update the class to track this for the caller, and update the\n semantics of the class to match up with this new capability.\n\nEventHeaderEnumerator.cs:\n\n- Rename EventHeaderEnumerator.GetItemType() to GetItemMetadata().\n- Fix the ElementCount property for struct element items returned by\n GetItemMetadata() or GetItemInfo() -- they should have had\n ElementCount = 1, but instead they had ElementCount = ArrayLength.\n- \"Fix\" the handling of nul-terminated fields that don't have a\n nul-termination before the end of the event. Old behavior was to treat\n the field as invalid. New behavior is to consider them to end at the end\n of the event.\n\nEventHeaderItemInfo.cs:\n\n- Rename property `Type` to `Metadata`.\n\nPerfItemType.cs:\n\n- Future PR will rename this file to PerfItemMetadata.cs.\n- Rewrote the struct comment.\n- Renamed `PerfItemType` to `PerfItemMetadata`.\n- Rewrote the constructor comment.\n- Renamed property `EncodingAndArrayFlags` to\n `EncodingAndArrayFlagAndIsScalar` and made it private.\n- Renamed constructor parameter `encodingAndArrayFlags` to\n `encodingAndArrayFlag` since only one array flag can be set at a time.\n- Added constructor parameter `isScalar`. Value of this parameter gets\n stored in the ChainFlag bit of `EncodingAndArrayFlagAndIsScalar`.\n- Renamed property `ArrayFlags` to `ArrayFlag`.\n- Added properties `IsScalar` and `IsElement`.\n- Removed property `IsArrayOrElement`.\n\nPerfItemValue.cs:\n\n- Rewrote the struct comment.\n- Rewrote the constructor comment.\n- Renamed property `Type` to `Metadata`.\n- Add new method `AppendJsonTo()` which is possible because the metadata\n class now tracks `IsScalar`.","shortMessageHtmlLink":"Fix PerfItemType problems"}},{"before":null,"after":"5f9ce0c1c20899fb0ef9ebb9a9436cbf35d05fe0","ref":"refs/heads/PerfItemMetadata","pushedAt":"2024-05-28T01:45:06.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"idigdoug","name":"Doug Cook","path":"/idigdoug","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/45909143?s=80&v=4"},"commit":{"message":"Update version to 0.1.3","shortMessageHtmlLink":"Update version to 0.1.3"}},{"before":"3dbd836ef701eda4dcf8ec286008cb31566e74c1","after":"5f9ce0c1c20899fb0ef9ebb9a9436cbf35d05fe0","ref":"refs/heads/main","pushedAt":"2024-05-20T20:07:19.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"idigdoug","name":"Doug Cook","path":"/idigdoug","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/45909143?s=80&v=4"},"commit":{"message":"Update version to 0.1.3","shortMessageHtmlLink":"Update version to 0.1.3"}},{"before":"88e5de54a6b28af83fce138740bd25505a737721","after":"3dbd836ef701eda4dcf8ec286008cb31566e74c1","ref":"refs/heads/main","pushedAt":"2024-05-20T19:59:28.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"idigdoug","name":"Doug Cook","path":"/idigdoug","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/45909143?s=80&v=4"},"commit":{"message":"Cleanup for v0.1.3","shortMessageHtmlLink":"Cleanup for v0.1.3"}},{"before":"89b918e96e4a9bac819ffb8b2914a2493e78679e","after":null,"ref":"refs/heads/Provider","pushedAt":"2024-05-18T23:51:01.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"idigdoug","name":"Doug Cook","path":"/idigdoug","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/45909143?s=80&v=4"}},{"before":"c30f91339ce8c76adfde2bcc826550a0d79a3b12","after":"88e5de54a6b28af83fce138740bd25505a737721","ref":"refs/heads/main","pushedAt":"2024-05-18T23:50:58.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"idigdoug","name":"Doug Cook","path":"/idigdoug","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/45909143?s=80&v=4"},"commit":{"message":"Add Provider library (#15)\n\nAdd a `Microsoft.LinuxTracepoints.Provider` assembly that supports generating Linux user_events Tracepoint events, using either basic encoding or EventHeader encoding.\r\n\r\nPublic classes:\r\n\r\n- PerfTracepoint: Represents a basic tracepoint registration. Construct to register with a command string (a string that contains the tracepoint name, field names, and field types, with syntax as described for [user_events command format](https://docs.kernel.org/trace/user_events.html#command-format)). Dispose to unregister. Use the IsEnabled property to determine whether any perf collection sessions are collecting the tracepoint. Use the Write method to generate an event (caller is responsible for packing the data as appropriate to match the field types specified in the command string; the Write method takes 0..5 args of type `ReadOnlySpan` and simply appends the provided data together to form the event payload).\r\n\r\n- EventHeaderDynamicProvider: Represents a set of tracepoints that use EventHeader encoding rules. Class is thread-safe (uses a reader/writer lock). Call provider.Register(level, keyword) to register a tracepoint. Call provider.Find(level, keyword) to get access to a previously-registered tracepoint. Call provider.FindOrRegister(level, keyword) for tracepoints that are registered at first use. Call provider.Dispose() to unregister all tracepoints (after which all Register/Find operations will throw an exception).\r\n\r\n - EventHeaderDynamicProviderOptions: Supports setting a provider group.\r\n\r\n- EventHeaderDynamicTracepoint: Represents a single tracepoint that uses EventHeader encoding rules. Class is thread-safe (logically immutable). Use IsEnabled property to determine whether any tracepoint collection session is collecting this tracepoint. (Generating events is done with the Builder class.)\r\n\r\n- EventHeaderDynamicBuilder: Helper for setting up the fields and attributes of an event. Class is NOT thread-safe (only one thread at a time can use a particular builder). Call builder.Reset(eventName) to start building an event. Call builder methods to configure event attributes and add fields. Call builder.Write(tracepoint) to write an event to the specified tracepoint. Call builder.Dispose() to return the builder's temporary buffers to the array pool.\r\n\r\n- EventHeaderValue128: interop class that represents any 16-byte value, such as an IPv6 address or a big-endian UUID. Used as an argument type for some of the builder methods to support adding fields of these types.","shortMessageHtmlLink":"Add Provider library (#15)"}},{"before":"3255783fa8850d774eec42ef916c5813b05b8085","after":"89b918e96e4a9bac819ffb8b2914a2493e78679e","ref":"refs/heads/Provider","pushedAt":"2024-05-17T02:58:35.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"idigdoug","name":"Doug Cook","path":"/idigdoug","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/45909143?s=80&v=4"},"commit":{"message":"Fix issues found in self-code-review\n\nBuilder:\n- Instead of throwing an exception when event gets too big, drop the\n event with an E2BIG error. This requires a bit of care because we\n don't want unlimited buffer growth, but we also don't want to write an\n event if we dropped any of its data, so we have to track a variable for\n \"did we drop any data from this event\".\n- Fix bad comments about opcodes.\n- Fix incorrectly-named AddDataU32. Should have been named AddDataU16.\n (I think it was the victim of a bad rename operation.)\n- AddGuid methods are no longer one-liners, so extract a method for them.\n\nProvider:\n- Fix bad comment for ToString.\n- Fix race condition if multiple threads try to Dispose the provider at\n the same time.\n\nTracepoint:\n- Return error when writing an event that is too big.","shortMessageHtmlLink":"Fix issues found in self-code-review"}},{"before":"fbf9e2835ca14fe9a99926ec1380cf6e4b2f9c6a","after":"3255783fa8850d774eec42ef916c5813b05b8085","ref":"refs/heads/Provider","pushedAt":"2024-05-16T21:39:23.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"idigdoug","name":"Doug Cook","path":"/idigdoug","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/45909143?s=80&v=4"},"commit":{"message":"Missed some documentation.","shortMessageHtmlLink":"Missed some documentation."}},{"before":"c5f980f6c3094f19bdc63308a9b3a27000829457","after":"fbf9e2835ca14fe9a99926ec1380cf6e4b2f9c6a","ref":"refs/heads/Provider","pushedAt":"2024-05-16T21:07:03.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"idigdoug","name":"Doug Cook","path":"/idigdoug","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/45909143?s=80&v=4"},"commit":{"message":"Finalized provider library v1","shortMessageHtmlLink":"Finalized provider library v1"}},{"before":"8cc9aeb7312d66699543c8090fcc60bdb0bb6e66","after":"c5f980f6c3094f19bdc63308a9b3a27000829457","ref":"refs/heads/Provider","pushedAt":"2024-05-16T01:48:14.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"idigdoug","name":"Doug Cook","path":"/idigdoug","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/45909143?s=80&v=4"},"commit":{"message":"Working, almost done\n\nTODO:\n- GetFields, AddFields\n- utf-8 name overloads","shortMessageHtmlLink":"Working, almost done"}},{"before":"c30f91339ce8c76adfde2bcc826550a0d79a3b12","after":"8cc9aeb7312d66699543c8090fcc60bdb0bb6e66","ref":"refs/heads/Provider","pushedAt":"2024-05-12T01:18:29.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"idigdoug","name":"Doug Cook","path":"/idigdoug","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/45909143?s=80&v=4"},"commit":{"message":"EventHeaderDynamicProvider - mostly done.\n\nTODO: implement adding fields in EventHeaderDynamicBuilder.","shortMessageHtmlLink":"EventHeaderDynamicProvider - mostly done."}},{"before":null,"after":"c30f91339ce8c76adfde2bcc826550a0d79a3b12","ref":"refs/heads/Provider","pushedAt":"2024-05-12T01:17:28.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"idigdoug","name":"Doug Cook","path":"/idigdoug","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/45909143?s=80&v=4"},"commit":{"message":"Decode - handle missing EventDesc (#12)\n\nIt is possible for a perf.data file to omit the EventDesc header. If\r\nthat happens, it means we can't get the event's name (e.g.\r\n\"user_events:MyEvent\") from it.\r\n\r\nThis is most significant for Sample events. Most Sample events are\r\ntracepoints, and tracepoints have associated format metadata, and the\r\nformat metadata contains the SystemName and TracepointName.\r\n\r\nSince the event name for tracepoints is \"SystemName:TracepointName\", we\r\ncan get the event name from either EventDesc header or format metadata.\r\nFix the Decode library to make that easier.\r\n\r\nPerfEventDesc.cs:\r\n- Slightly unrelated, don't accept null for the ids parameter.\r\n- Slightly unrelated, the only caller of the private EmptyIds property is\r\n now the Empty property, so inline it.\r\n- Update comments to explain when the Name property might be empty.\r\n- Add GetName() method that can get the name from either the EventDesc\r\n header or the format metadata.\r\n- Change ToString() to use GetName().\r\n\r\nPerfNonSampleEventInfo.cs:\r\n- Update comments to explain when the Name property might be empty.\r\n\r\nPerfSampleEventInfo.cs:\r\n- Update comments to explain when the Name property might be empty.\r\n- Change ToString() to use eventDesc.GetName() instead of eventDesc.Name.\r\n- Add a GetName() method that returns eventDesc.GetName().\r\n- AppendJsonEventIdentityTo can now fall back to format metadata for name.\r\n- AppendJsonEventInfoTo can now fall back to format metadata for name.\r\n\r\nPerfSessionInfo.cs:\r\n- AppendJsonEventInfoTo can now fall back to format metadata for name.\r\n- In the unexpected case when event name is present in EventDesc but\r\n contains no colon character, put the name in the provider part instead\r\n of the event part.\r\n\r\nPerfToJson.cs:\r\n- Use GetName() so that we get the name from Format if not available\r\n from EventDesc.\r\n- In the unexpected case when event name is present in EventDesc but\r\n contains no colon character, put the name in the provider part instead\r\n of the event part.\r\n\r\nDataToWriter.cs:\r\n- Use GetName() so that we get the name from Format if not available\r\n from EventDesc.","shortMessageHtmlLink":"Decode - handle missing EventDesc (#12)"}},{"before":"7d7a9b48ef5f71df7bd1581f7cad6540c4b23467","after":null,"ref":"refs/heads/DecodeEventDescName","pushedAt":"2024-05-10T01:51:03.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"idigdoug","name":"Doug Cook","path":"/idigdoug","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/45909143?s=80&v=4"}},{"before":"7048e4fd5e149b82703b7cd92dd0ebb3c26bfaa1","after":"c30f91339ce8c76adfde2bcc826550a0d79a3b12","ref":"refs/heads/main","pushedAt":"2024-05-10T01:50:53.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"idigdoug","name":"Doug Cook","path":"/idigdoug","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/45909143?s=80&v=4"},"commit":{"message":"Decode - handle missing EventDesc (#12)\n\nIt is possible for a perf.data file to omit the EventDesc header. If\r\nthat happens, it means we can't get the event's name (e.g.\r\n\"user_events:MyEvent\") from it.\r\n\r\nThis is most significant for Sample events. Most Sample events are\r\ntracepoints, and tracepoints have associated format metadata, and the\r\nformat metadata contains the SystemName and TracepointName.\r\n\r\nSince the event name for tracepoints is \"SystemName:TracepointName\", we\r\ncan get the event name from either EventDesc header or format metadata.\r\nFix the Decode library to make that easier.\r\n\r\nPerfEventDesc.cs:\r\n- Slightly unrelated, don't accept null for the ids parameter.\r\n- Slightly unrelated, the only caller of the private EmptyIds property is\r\n now the Empty property, so inline it.\r\n- Update comments to explain when the Name property might be empty.\r\n- Add GetName() method that can get the name from either the EventDesc\r\n header or the format metadata.\r\n- Change ToString() to use GetName().\r\n\r\nPerfNonSampleEventInfo.cs:\r\n- Update comments to explain when the Name property might be empty.\r\n\r\nPerfSampleEventInfo.cs:\r\n- Update comments to explain when the Name property might be empty.\r\n- Change ToString() to use eventDesc.GetName() instead of eventDesc.Name.\r\n- Add a GetName() method that returns eventDesc.GetName().\r\n- AppendJsonEventIdentityTo can now fall back to format metadata for name.\r\n- AppendJsonEventInfoTo can now fall back to format metadata for name.\r\n\r\nPerfSessionInfo.cs:\r\n- AppendJsonEventInfoTo can now fall back to format metadata for name.\r\n- In the unexpected case when event name is present in EventDesc but\r\n contains no colon character, put the name in the provider part instead\r\n of the event part.\r\n\r\nPerfToJson.cs:\r\n- Use GetName() so that we get the name from Format if not available\r\n from EventDesc.\r\n- In the unexpected case when event name is present in EventDesc but\r\n contains no colon character, put the name in the provider part instead\r\n of the event part.\r\n\r\nDataToWriter.cs:\r\n- Use GetName() so that we get the name from Format if not available\r\n from EventDesc.","shortMessageHtmlLink":"Decode - handle missing EventDesc (#12)"}},{"before":"e6d48363445d502de20f33fae62746e08bcb4178","after":null,"ref":"refs/heads/Provider","pushedAt":"2024-05-10T01:41:25.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"idigdoug","name":"Doug Cook","path":"/idigdoug","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/45909143?s=80&v=4"}},{"before":"8e6c5b54e0f643b981ace74b516793fc35b2b3be","after":"7048e4fd5e149b82703b7cd92dd0ebb3c26bfaa1","ref":"refs/heads/main","pushedAt":"2024-05-10T01:41:21.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"idigdoug","name":"Doug Cook","path":"/idigdoug","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/45909143?s=80&v=4"},"commit":{"message":"Provider - prototype support for generating events (#14)\n\nPrototype support for generating user_events tracepoints from .NET.\r\nCurrently fairly basic - normal tracepoints only (no EventHeader\r\nsupport), does not help with packing your event (you declare whatever\r\nyou want as your event format, and then you provide whatever data bytes\r\nyou want as your event payload). But it works and seems reliable and\r\nfast.\r\n\r\nOnly exposed type so far is `PerfTracepoint`, which directly exposes\r\nregistration and management of a tracepoint.\r\n\r\nThis requires .NET 5.0 or later due to the use of the Pinned Object\r\nHeap. Safe and efficient implementation requires the StatusWord to be\r\nallocated from pinned managed memory. Efficient long-term-pinned memory\r\nis not really available until .NET 5.0.\r\n\r\nLow-level implementation:\r\n\r\n- File handle object that owns a Posix file handle and provides support\r\n for writev and ioctl operations.\r\n- DataSegment is for use with writev, and represents a Linux iovec\r\n (which basically means an EVENT_DATA_DESCRIPTOR in ETW terms).\r\n- TracepointHandle object that owns a tracepoint registration and\r\n provides low-level support for:\r\n - Finding and opening the `user_events_status` file.\r\n - Registering tracepoints.\r\n - Checking whether tracepoints are enabled.\r\n - Writing tracepoint events.\r\n - Cleaning up.\r\n\r\nThat much is pretty stable and solid. The prototype part is what the\r\npublic exposed interface should look like. For now, I'm just exposing\r\nraw (but memory-safe) access to a tracepoint via a PerfTracepoint class.\r\n\r\nThis class supports registering (caller directly provides the name-args\r\nstring, which is not parsed or validated) in the constructor, supports\r\nan IsEnabled property (very efficient), and supports Write(...) with up\r\nto 5 parameters. Each parameter is a `ReadOnlySpan`, so caller can\r\nprovide just about any data they want as input.","shortMessageHtmlLink":"Provider - prototype support for generating events (#14)"}},{"before":"c06a257d3c2c075d4efda7f01f1f0f0e42b63a5c","after":null,"ref":"refs/heads/CS12","pushedAt":"2024-05-09T23:36:41.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"idigdoug","name":"Doug Cook","path":"/idigdoug","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/45909143?s=80&v=4"}},{"before":"8a270fc85a9a3bb2145ca0d063a0804effd6f4d5","after":"8e6c5b54e0f643b981ace74b516793fc35b2b3be","ref":"refs/heads/main","pushedAt":"2024-05-09T23:36:39.000Z","pushType":"pr_merge","commitsCount":1,"pusher":{"login":"idigdoug","name":"Doug Cook","path":"/idigdoug","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/45909143?s=80&v=4"},"commit":{"message":"Use CSharp language version 12 (#13)\n\nUpdate to CSharp version 12.\r\n\r\nDoing this reveals that newly-enforced validation for tracking lifetimes\r\ndoesn't allow passing passing the PerfEventBytes struct by `in` ref\r\nwithout marking the caller as `unsafe`. We don't want the caller to have\r\nto be unsafe, so fix. I'm not entirely sure why this is disallowed, but\r\nthe `in` was just a minor performance optimization, so just remove it.","shortMessageHtmlLink":"Use CSharp language version 12 (#13)"}},{"before":"8a270fc85a9a3bb2145ca0d063a0804effd6f4d5","after":"e6d48363445d502de20f33fae62746e08bcb4178","ref":"refs/heads/Provider","pushedAt":"2024-05-09T23:15:05.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"idigdoug","name":"Doug Cook","path":"/idigdoug","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/45909143?s=80&v=4"},"commit":{"message":"Provider - prototype support for generating events\n\nPrototype support for generating user_events tracepoints from .NET.\nCurrently fairly basic - normal tracepoints only (no EventHeader\nsupport), does not help with packing your event (you declare whatever\nyou want as your event format, and then you provide whatever data bytes\nyou want as your event payload). But it works and seems reliable and\nfast.\n\nOnly exposed type so far is `PerfTracepoint`, which directly exposes\nregistration and management of a tracepoint.\n\nThis requires .NET 5.0 or later due to the use of the Pinned Object\nHeap. Safe and efficient implementation requires the StatusWord to be\nallocated from pinned managed memory. Efficient long-term-pinned memory\nis not really available until .NET 5.0.\n\nLow-level implementation:\n\n- File handle object that owns a Posix file handle and provides support\n for writev and ioctl operations.\n- DataSegment is for use with writev, and represents a Linux iovec\n (which basically means an EVENT_DATA_DESCRIPTOR in ETW terms).\n- TracepointHandle object that owns a tracepoint registration and\n provides low-level support for:\n - Finding and opening the `user_events_status` file.\n - Registering tracepoints.\n - Checking whether tracepoints are enabled.\n - Writing tracepoint events.\n - Cleaning up.\n\nThat much is pretty stable and solid. The prototype part is what the\npublic exposed interface should look like. For now, I'm just exposing\nraw (but memory-safe) access to a tracepoint via a PerfTracepoint class.\n\nThis class supports registering (caller directly provides the name-args\nstring, which is not parsed or validated) in the constructor, supports\nan IsEnabled property (very efficient), and supports Write(...) with up\nto 5 parameters. Each parameter is a `ReadOnlySpan`, so caller can\nprovide just about any data they want as input.","shortMessageHtmlLink":"Provider - prototype support for generating events"}},{"before":null,"after":"8a270fc85a9a3bb2145ca0d063a0804effd6f4d5","ref":"refs/heads/Provider","pushedAt":"2024-05-09T23:02:53.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"idigdoug","name":"Doug Cook","path":"/idigdoug","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/45909143?s=80&v=4"},"commit":{"message":"DecodeWpa moved to Microsoft-Performance-Tools-Linux-Android\n\nWPA decoding support plugin moved to\nhttps://github.com/microsoft/Microsoft-Performance-Tools-Linux-Android/tree/develop/PerfDataExtension","shortMessageHtmlLink":"DecodeWpa moved to Microsoft-Performance-Tools-Linux-Android"}},{"before":"8a270fc85a9a3bb2145ca0d063a0804effd6f4d5","after":"c06a257d3c2c075d4efda7f01f1f0f0e42b63a5c","ref":"refs/heads/CS12","pushedAt":"2024-05-09T22:53:05.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"idigdoug","name":"Doug Cook","path":"/idigdoug","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/45909143?s=80&v=4"},"commit":{"message":"Use CSharp language version 12\n\nUpdate to CSharp version 12.\n\nDoing this reveals that newly-enforced validation for tracking lifetimes\ndoesn't allow passing passing the PerfEventBytes struct by `in` ref\nwithout marking the caller as `unsafe`. We don't want the caller to have\nto be unsafe, so fix. I'm not entirely sure why this is disallowed, but\nthe `in` was just a minor performance optimization, so just remove it.","shortMessageHtmlLink":"Use CSharp language version 12"}},{"before":null,"after":"8a270fc85a9a3bb2145ca0d063a0804effd6f4d5","ref":"refs/heads/CS12","pushedAt":"2024-05-09T22:49:14.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"idigdoug","name":"Doug Cook","path":"/idigdoug","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/45909143?s=80&v=4"},"commit":{"message":"DecodeWpa moved to Microsoft-Performance-Tools-Linux-Android\n\nWPA decoding support plugin moved to\nhttps://github.com/microsoft/Microsoft-Performance-Tools-Linux-Android/tree/develop/PerfDataExtension","shortMessageHtmlLink":"DecodeWpa moved to Microsoft-Performance-Tools-Linux-Android"}},{"before":"8a270fc85a9a3bb2145ca0d063a0804effd6f4d5","after":"7d7a9b48ef5f71df7bd1581f7cad6540c4b23467","ref":"refs/heads/DecodeEventDescName","pushedAt":"2024-05-09T21:52:27.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"idigdoug","name":"Doug Cook","path":"/idigdoug","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/45909143?s=80&v=4"},"commit":{"message":"Decode - handle missing EventDesc\n\nIt is possible for a perf.data file to omit the EventDesc header. If\nthat happens, it means we can't get the event's name (e.g.\n\"user_events:MyEvent\") from it.\n\nThis is most significant for Sample events. Most Sample events are\ntracepoints, and tracepoints have associated format metadata, and the\nformat metadata contains the SystemName and TracepointName.\n\nSince the event name for tracepoints is \"SystemName:TracepointName\", we\ncan get the event name from either EventDesc header or format metadata.\nFix the Decode library to make that easier.\n\nPerfEventDesc.cs:\n- Slightly unrelated, don't accept null for the ids parameter.\n- Slightly unrelated, the only caller of the private EmptyIds property is\n now the Empty property, so inline it.\n- Update comments to explain when the Name property might be empty.\n- Add GetName() method that can get the name from either the EventDesc\n header or the format metadata.\n- Change ToString() to use GetName().\n\nPerfNonSampleEventInfo.cs:\n- Update comments to explain when the Name property might be empty.\n\nPerfSampleEventInfo.cs:\n- Update comments to explain when the Name property might be empty.\n- Change ToString() to use eventDesc.GetName() instead of eventDesc.Name.\n- Add a GetName() method that returns eventDesc.GetName().\n- AppendJsonEventIdentityTo can now fall back to format metadata for name.\n- AppendJsonEventInfoTo can now fall back to format metadata for name.\n\nPerfSessionInfo.cs:\n- AppendJsonEventInfoTo can now fall back to format metadata for name.\n- In the unexpected case when event name is present in EventDesc but\n contains no colon character, put the name in the provider part instead\n of the event part.\n\nPerfToJson.cs:\n- Use GetName() so that we get the name from Format if not available\n from EventDesc.\n- In the unexpected case when event name is present in EventDesc but\n contains no colon character, put the name in the provider part instead\n of the event part.\n\nDataToWriter.cs:\n- Use GetName() so that we get the name from Format if not available\n from EventDesc.","shortMessageHtmlLink":"Decode - handle missing EventDesc"}},{"before":null,"after":"8a270fc85a9a3bb2145ca0d063a0804effd6f4d5","ref":"refs/heads/DecodeEventDescName","pushedAt":"2024-05-09T21:52:08.000Z","pushType":"branch_creation","commitsCount":0,"pusher":{"login":"idigdoug","name":"Doug Cook","path":"/idigdoug","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/45909143?s=80&v=4"},"commit":{"message":"DecodeWpa moved to Microsoft-Performance-Tools-Linux-Android\n\nWPA decoding support plugin moved to\nhttps://github.com/microsoft/Microsoft-Performance-Tools-Linux-Android/tree/develop/PerfDataExtension","shortMessageHtmlLink":"DecodeWpa moved to Microsoft-Performance-Tools-Linux-Android"}},{"before":"49e38c11f31a7a230989c2b068efcd1e2d69e1ab","after":"8a270fc85a9a3bb2145ca0d063a0804effd6f4d5","ref":"refs/heads/main","pushedAt":"2024-05-09T21:31:10.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"idigdoug","name":"Doug Cook","path":"/idigdoug","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/45909143?s=80&v=4"},"commit":{"message":"DecodeWpa moved to Microsoft-Performance-Tools-Linux-Android\n\nWPA decoding support plugin moved to\nhttps://github.com/microsoft/Microsoft-Performance-Tools-Linux-Android/tree/develop/PerfDataExtension","shortMessageHtmlLink":"DecodeWpa moved to Microsoft-Performance-Tools-Linux-Android"}},{"before":"6aa180296d5420db956977ea8e9f4489cf89df0c","after":"49e38c11f31a7a230989c2b068efcd1e2d69e1ab","ref":"refs/heads/main","pushedAt":"2024-05-06T19:33:23.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"idigdoug","name":"Doug Cook","path":"/idigdoug","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/45909143?s=80&v=4"},"commit":{"message":"NuGet fixes\n\nNuGet changes:\n\n- Create an icon.\n- Fix Title of the Types nuget.\n- For all NuGets: Add icon, require license acceptance, add tags.\n- For all NuGet README.md: Add Project section, update release date.\n\nCode change to avoid unnecessary `CreateSpan`.\n\n- `CreateSpan` is unsafe, so we want to avoid it.\n- Alternatives used here are more straightforward to understand.\n- Micro-benchmark indicates that alternatives are usually faster.","shortMessageHtmlLink":"NuGet fixes"}},{"before":"438e55ec85a23569d2ea37660bbc52e898af7e6e","after":"6aa180296d5420db956977ea8e9f4489cf89df0c","ref":"refs/heads/main","pushedAt":"2024-05-02T21:04:02.000Z","pushType":"push","commitsCount":1,"pusher":{"login":"idigdoug","name":"Doug Cook","path":"/idigdoug","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/45909143?s=80&v=4"},"commit":{"message":"Update readme and comments","shortMessageHtmlLink":"Update readme and comments"}},{"before":"a2d55691353471047c7420a882c5afcd21ded861","after":null,"ref":"refs/heads/ControlChars","pushedAt":"2024-05-02T20:23:46.000Z","pushType":"branch_deletion","commitsCount":0,"pusher":{"login":"idigdoug","name":"Doug Cook","path":"/idigdoug","primaryAvatarUrl":"https://avatars.githubusercontent.com/u/45909143?s=80&v=4"}}],"hasNextPage":true,"hasPreviousPage":false,"activityType":"all","actor":null,"timePeriod":"all","sort":"DESC","perPage":30,"cursor":"djE6ks8AAAAEW0fUMAA","startCursor":null,"endCursor":null}},"title":"Activity ยท microsoft/LinuxTracepoints-Net"}