-
Notifications
You must be signed in to change notification settings - Fork 389
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[vioscsi] DriverEntry() improved tracing #1215
Open
benyamin-codez
wants to merge
1
commit into
virtio-win:master
Choose a base branch
from
benyamin-codez:vioscsi-driver-entry
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
/* | ||
* This file contains NTDDI_ globals | ||
* | ||
* Copyright (c) 2012-2024 Red Hat, Inc. | ||
* | ||
* Redistribution and use in source and binary forms, with or without | ||
* modification, are permitted provided that the following conditions | ||
* are met : | ||
* 1. Redistributions of source code must retain the above copyright | ||
* notice, this list of conditions and the following disclaimer. | ||
* 2. Redistributions in binary form must reproduce the above copyright | ||
* notice, this list of conditions and the following disclaimer in the | ||
* documentation and / or other materials provided with the distribution. | ||
* 3. Neither the names of the copyright holders nor the names of their contributors | ||
* may be used to endorse or promote products derived from this software | ||
* without specific prior written permission. | ||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND | ||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
* ARE DISCLAIMED.IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE | ||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
* SUCH DAMAGE. | ||
*/ | ||
|
||
#ifndef ___NTDDIVER_H__ | ||
#define ___NTDDIVER_H__ | ||
|
||
// #include <sdkddkver.h> | ||
|
||
// The following are additional definitions not found in current EWDK(s) | ||
// at <drive:>\Program Files\Windows Kits\10\Include\10.0.<build>.0\shared\sdkddkver.h | ||
|
||
#ifndef NTDDI_WINTHRESHOLD | ||
#define NTDDI_WINTHRESHOLD 0x0A000000 /* ABRACADABRA_THRESHOLD */ | ||
#endif | ||
|
||
#define NTDDI_THRESHOLD NTDDI_WINTHRESHOLD | ||
|
||
#ifndef NTDDI_WIN10_NI | ||
#define NTDDI_WIN10_NI 0x0A00000C // Windows 10.0.22449-22631 / Nickel / 22H2 | ||
#define NTDDI_WIN10_CU 0x0A00000D // Windows 10.0.25057-25236 / Copper / 23H1 | ||
#endif | ||
|
||
#ifndef NTDDI_WIN11 | ||
#define NTDDI_WIN11 NTDDI_WIN10_CO | ||
#define NTDDI_WIN11_CO NTDDI_WIN10_CO // Windows 10.0.21277-22000 / Cobalt / 21H2 | ||
#define NTDDI_WIN11_NI NTDDI_WIN10_NI // Windows 10.0.22449-22631 / Nickel / 22H2 | ||
#define NTDDI_WIN11_CU NTDDI_WIN10_CU // Windows 10.0.25057-25236 / Copper / 23H1 | ||
#endif | ||
|
||
#ifndef NTDDI_WIN11_ZN | ||
#define NTDDI_WIN11_ZN 0x0A00000E // Windows 10.0.25246-25398 / Zinc / 23H2 | ||
#define NTDDI_WIN11_GA 0x0A00000F // Windows 10.0.25905-25941 / Gallium / 24H1 | ||
#define NTDDI_WIN11_GE 0x0A000010 // Windows 10.0.25947-26100 / Germanium / 24H2 | ||
#endif | ||
|
||
#ifndef NTDDI_WIN11_DT | ||
#define NTDDI_WIN11_DT 0x0A000011 // Windows 10.0.27686-27691 / Dilithium / 25H1 | ||
#define NTDDI_WIN11_SE 0x0A000012 // Windows 10.0.27764 / Selenium / 25H2 | ||
#endif | ||
|
||
#endif ___NTDDIVER_H__ |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again, why not to print this alway?
This is not a "performance path," and it is degrading existing behavior.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The mechanism provides a means to run without WPP which can result in an approx. 80-100 μs latency improvement and an increase of 20-50k IOPS for 4KiB random I/O (with 32 queues, 16 threads on 4KiB segments). When WPP is turned off, these macros stop compile-time errors when building.
The mechanism is also quite useful during development to help determine the overhead of various tracing changes.