trace

System.Diagnostics.Trace not working in web app under ApplicationPoolIdentity

冷暖自知 提交于 2019-12-03 09:31:21
I have a web application which does (ab)use of System.Diagnostics Tracing. As usual, everything went fine until we hit production this week, where none of our listeners were being hit. Researching a bit, it was clearly a User Account permission issue. Changing from ApplicationPoolIdentity to LocalSystem seemed to do the trick. However, in our production environment changing the User that runs to LocalSystem is a no go. I suspect it has something to do with the security permission needed to run unmanaged code. Is there another way to make Tracing work under ApplicationPoolIdentity? Or (as our

Can Intel PT (Processor Trace) be disabled/configured from within an OS?

假装没事ソ 提交于 2019-12-03 08:50:40
I have a number of questions about Intel PT (have been trying to decode the manual but is very difficult). My questions are: I am trying to find out if Intel PT can be disabled or reconfigured from within an OS, or, more generally, from within the system it is providing a trace of. Does Intel PT generate events on writes to specific registers - such as CR3, IDTR, etc Can Intel PT write values back to the system - i.e. can an external debugging machine actively perform writes to register, cache or memory? Any help is much appreciated, thankyou!! I'm also currently figuring out how to use Intel

How to trace per-file IO operations in Linux?

杀马特。学长 韩版系。学妹 提交于 2019-12-03 07:32:34
问题 I need to track read system calls for specific files, and I'm currently doing this by parsing the output of strace . Since read operates on file descriptors I have to keep track of the current mapping between fd and path . Additionally, seek has to be monitored to keep the current position up-to-date in the trace. Is there a better way to get per-application, per-file-path IO traces in Linux? 回答1: First, you probably don't need to keep track because mapping between fd and path is available in

Linux: How to debug a SIGSEGV? How do I trace the error source?

心已入冬 提交于 2019-12-03 07:11:32
My firefox started crashing since today. I haven't changed anything on the system or on firefox config. I use strace -ff -o dumpfile.txt firefox to trace the problem. It's not a big help. I see the segfault, in two of the generated process dumps, but how I can trace them to their cause? After running for 10 seconds and crashing, 22MB of data is generated by strace. This is a snippet of the output, where you can see actual SIGSEGV in the middle.: read(19, "\372", 1) = 1 gettimeofday({1245590019, 542231}, NULL) = 0 read(3, "\6\0[Qmy\26\0\3\1\0\0Y\0\200\2\0\0\0\0\323\3A\0\323\3(\0\20\0\1\0", 4096

Is there a way to trace through only project source in Delphi?

匆匆过客 提交于 2019-12-03 06:05:22
I'm using Delphi 2010 and I'm wondering if there's a way to trace through code which is in the project without tracing through calls to included VCLs. For example - you put in a breakpoint and then use Shift + F7 to trace through line-by-line. Now you run into a call to some lengthy procedure in a VCL - in my case it's often a Measurement Studio or other component that draws the doodads for a bunch of I/O, OPC, or other bits. At any rate, what happens is that the debugger hops out of the active source file, opens the component source, and traces through that line by line. Often this is

Windows Azure Trace Log not working

人盡茶涼 提交于 2019-12-03 06:02:30
I'm sure I have missed something simple but I can't get simple Trace.WriteLine to work on Azure. Steps I have taken: Microsoft.WindowsAzure.Plugins.Diagnostics.ConnectionString has been set up to our Azure storage account Import Module Diagnostics to service definition file. Web config : <system.diagnostics> <switches> <add name="logLevel" value="4" /> </switches> <trace autoflush="false" indentsize="4"> <listeners> <add type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, Microsoft.WindowsAzure.Diagnostics, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"

How to print each line of a script as it is run only for the top-level script being run?

家住魔仙堡 提交于 2019-12-03 05:13:18
python's trace module will allow you to run a script printing each line of code as it is run in both the script and all imported modules like so: python -m trace -trace myscript.py Is there a way to do the same thing, but only print the top-level calls, i.e. only print the lines in myscript.py as they are run? I am trying to debug an abort trap failure and I can't figure out where it's dying. Unfortunately, using the full --trace takes forever - the script normally takes 2-3 minutes to run, and the full trace has been going for hours. I stumbled into this problem and found grep to be a quick

How to make DebugView work under .NET 4?

≡放荡痞女 提交于 2019-12-03 04:25:10
SysInternals' DebugView no longer works if used under .NET 4. Some research indicated that the new architecture of the framework did not allow for traces to be captured if a debugger was attached; in my case it's the Visual Studio debugger. Changing target framework from 4 to 3.5 makes it work again. Anybody knows a way of getting DebugView to work under .NET 4 while having the Visual Studio debugger attached? I tried clearing the Listeners collection of the Trace class, but no luck. .NET trace messages are emitted using the OutputDebugString function in the Windows kernel. This function, as

How to measure Python's asyncio code performance?

 ̄綄美尐妖づ 提交于 2019-12-03 03:32:39
I can't use normal tools and technics to measure the performance of a coroutine because the time it takes at await should not be taken in consideration (or it should just consider the overhead of reading from the awaitable but not the IO latency). So how do measure the time a coroutine takes ? How do I compare 2 implementations and find the more efficent ? What tools do I use ? This answer originally contained two different solutions: the first one was based on monkey-patching and the second one does not work for python 3.7 and onward. This new version hopefully presents a better, more robust

Profiling a (possibly I/O-bound) process to reduce latency

喜夏-厌秋 提交于 2019-12-03 02:51:52
I want to improve the performance of a specific method inside a larger application. The goal is improving latency (wall-clock time spent in a specific function), not (neccessarily) system load. Requirements: As I expect a lot of the latency to be due to I/O, take into account time spent waiting/blocked (in other words: look at wall clock time instead of CPU time) As the program does much more than the fragment i'm trying to optimize. There needs to be a way to either start/stop profiling programmatically, or to filter the output to only show the time between entering and exiting the function i