-
Notifications
You must be signed in to change notification settings - Fork 373
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[NO-TICKET] Profiling refactor: typedef most structures
**What does this PR do?** In C, when you declare a `struct foo { ... };` (a bag of fields), you need to always call it `struct foo` by default. But, using the `typedef` keyword instead, e.g. `typedef struct { ... } foo;` you can now refer to the type as `foo`. I've done a big pass and converted almost all structs we have to a typedef. Some already had both names (`struct foo` and `foo`), and in those cases I left only the typedef. **Motivation:** Historically the profiler codebase has used structs both with and without the typedef in a quite inconsistent way. I've been meaning to fix this inconsistency. **Additional Notes:** There's a few structs in the heap profiler I did not touch. That's because I'm working on a PR that has a number of big changes to the heap profiler and it's not worth doing those changes, introducing more conflicts, just to then remove many of them as they are unused and whatnot. **How to test the change?** The code successfully compiling + the existing test coverage is enough to validate these changes.
- Loading branch information
Showing
15 changed files
with
270 additions
and
270 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
108 changes: 54 additions & 54 deletions
108
ext/datadog_profiling_native_extension/collectors_cpu_and_wall_time_worker.c
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.