This is an archive of the discontinued LLVM Phabricator instance.

[X86] ptwrite intrinsic
ClosedPublic

Authored by GBuella on May 7 2018, 11:44 AM.

Diff Detail

Repository
rC Clang

Event Timeline

GBuella created this revision.May 7 2018, 11:44 AM
GBuella updated this revision to Diff 145681.May 8 2018, 6:26 AM

Rebased.

This revision is now accepted and ready to land.May 8 2018, 8:40 AM

Could you maybe add some short summaries to your patches? It's hard for non-Intel employees to guess what all these instructions do...

Could you maybe add some short summaries to your patches? It's hard for non-Intel employees to guess what all these instructions do...

Well, I was thinking I could copy-paste this from https://software.intel.com/en-us/articles/intel-sdm :
"This instruction reads data in the source operand and sends it to the Intel Processor Trace hardware to be encoded
in a PTW packet if TriggerEn, ContextEn, FilterEn, and PTWEn are all set to 1. For more details on these values, see
Intel® 64 and IA-32 Architectures Software Developer’s Manual, Volume 3C, Section 35.2.2, “Software Trace
Instrumentation with PTWRITE”."

Do you think this would really help anyone? It appears to be just meaningless without larger context.
Those who ever need this, need to read a lot of these manuals anyways, I think noone in practice is going to be enlightened by such a short description.

That of course makes a lot more sense with simpler instructions, e.g. movdir64b - I can just describe that as something like "atomically moving 64 bytes".

This revision was automatically updated to reflect the committed changes.

Could you maybe add some short summaries to your patches? It's hard for non-Intel employees to guess what all these instructions do...

Well, I was thinking I could copy-paste this from https://software.intel.com/en-us/articles/intel-sdm :
"This instruction reads data in the source operand and sends it to the Intel Processor Trace hardware to be encoded
in a PTW packet if TriggerEn, ContextEn, FilterEn, and PTWEn are all set to 1. For more details on these values, see
Intel® 64 and IA-32 Architectures Software Developer’s Manual, Volume 3C, Section 35.2.2, “Software Trace
Instrumentation with PTWRITE”."

Do you think this would really help anyone? It appears to be just meaningless without larger context.
Those who ever need this, need to read a lot of these manuals anyways, I think noone in practice is going to be enlightened by such a short description.

That of course makes a lot more sense with simpler instructions, e.g. movdir64b - I can just describe that as something like "atomically moving 64 bytes".

My 2 cents: I actually think this is worth a bit because it gives additional information so the reader can at least put the instruction into a category.