Bug 5449 – [profile] To disable profiling of a function/class/struct

Status
NEW
Severity
enhancement
Priority
P4
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2011-01-13T03:04:03Z
Last change time
2024-12-13T17:54:42Z
Keywords
bootcamp
Assigned to
No Owner
Creator
bearophile_hugs
Moved to GitHub: dmd#18326 →

Comments

Comment #0 by bearophile_hugs — 2011-01-13T03:04:03Z
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 by robert.schadek — 2024-12-13T17:54:42Z
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