D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 5449 - [profile] To disable profiling of a function/class/struct
Summary: [profile] To disable profiling of a function/class/struct
Status: NEW
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: All All
: P4 enhancement
Assignee: No Owner
URL:
Keywords: bootcamp
Depends on:
Blocks:
 
Reported: 2011-01-13 03:04 UTC by bearophile_hugs
Modified: 2024-12-13 17:54 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description bearophile_hugs 2011-01-13 03:04:03 UTC
Sometimes during profiling a program becomes too much slow. To improve this I suggest to add an annotation to disable profiling for a specific function that the programmer knows to be slow.

The profiler will not trace foo() and all static/instance member functions of Bar/Spam:

pragma(notrace) void foo() { /*...*/ }
pragma(notrace) class Bar { /*...*/ }
pragma(notrace) struct Spam { /*...*/ }

-------------

Similarly, I'd also like some way to disable the tracing of a function/class/struct/union coming from another module. This syntax is not good yet:

import foo: pragma(notrace) something;
Comment 1 dlangBugzillaToGithub 2024-12-13 17:54:42 UTC
THIS ISSUE HAS BEEN MOVED TO GITHUB

https://github.com/dlang/dmd/issues/18326

DO NOT COMMENT HERE ANYMORE, NOBODY WILL SEE IT, THIS ISSUE HAS BEEN MOVED TO GITHUB