trace

Linux kernel's ftrace output format

☆樱花仙子☆ 提交于 2019-12-06 16:36:17
I'm using ftrace on Android on a couple of different devices, but I noticed that the output format differs between them. In some cases, the TGID of the current process is included, while in others, it is not. The TGID is very useful in the current application I'm using ftrace on, and I'm wondering how I could enable that. I'm aware of the sysfs file "/sys/kernel/debug/tracing/options/print-tgid", but this isn't available on my devices, unfortunately. Are there any kernel options or ftrace handles that can be used to add TGID to the ftrace output format? # _-----=> irqs-off # / _----=> need

AS3 - Trace - Click button

寵の児 提交于 2019-12-06 15:18:10
I am trying to click on a button and trace out a number "1" onto the stage/same scene. I have this code: button1.addEventListener(MouseEvent.CLICK, myClickReaction1); function myClickReaction1 (e:MouseEvent):void{ trace("1"); } BUT it traces onto the output of flash and not onto the scene. please help thanks trace("1"); will go to the output panel it is intended for debugging. If you want to see something on the stage, you will need to create a TextField and set it's text property to whatever you want. button1.addEventListener(MouseEvent.CLICK, myClickReaction1); function myClickReaction1 (e

can't write into log file using TraceSource Method in C#

给你一囗甜甜゛ 提交于 2019-12-06 15:06:09
I am using the following code to log the exception, but it's not writing any logs into the file " mylistener.log ". What am I missing here? using System; using System.Diagnostics; namespace TraceSourceApp { class Program { private static TraceSource mySource = new TraceSource("TraceSourceApp"); static void Main(string[] args) { TextWriterTraceListener textListener = new TextWriterTraceListener("myListener.log"); mySource.Listeners.Add(textListener); int i = 10, j = 0, k; try { k = i / j; } catch { mySource.TraceEvent(TraceEventType.Error, 12, "Division by Zero"); } mySource.Close(); } } } In

Get Windows event provider information

醉酒当歌 提交于 2019-12-06 13:42:45
I would like to retrieve information about event providers using Windows PowerShell? I'm running Windows 8.1 with PowerShell version 4.0, and I noticed that there are some .NET classes in the System.Diagnostics.Eventing namespace that offer some functionality around Windows eventing. I can create an EventProvider instance by calling its default constructor, however this does not allow me to get any information about the event providers installed on the system. $EventProvider = New-Object -TypeName System.Diagnostics.Eventing.EventProvider -ArgumentList ([System.Guid]'{00000000-0000-0000-0000

aspect c++ tracing function control flow and input output parameters

混江龙づ霸主 提交于 2019-12-06 13:40:18
问题 I am using aspectc++ to generate control flow of the program. trace.ah : #ifndef __trace_ah__ #define __trace_ah__ #include <cstdio> // Control flow tracing example aspect trace { // print the function name before execution starts pointcut virtual methods() = "% ...::%(...)"; advice execution (methods()) : before () { cout << "entering: " << JoinPoint::signature() << endl; // print input parameters** } advice execution(methods()) : after() { // print output parameters** cout << "leaving: " <<

golang, ebpf and functions duration

梦想的初衷 提交于 2019-12-06 11:54:26
I'm playing with gobpf and have got an issue with calculating a duration of traced user-space function. I use bpf_ktime_get_ns() to read time and then trying to calculate delta, but got enormous numbers, though traced function sleeps just 1 second. Here is the tested C-program, which has a function called "ameba". #include <stdio.h> #include <strings.h> #include <stdlib.h> #include <time.h> #include <unistd.h> char * ameba(char * s1, char * s2); int main(void) { time_t rawtime; struct tm * timeinfo; time(&rawtime); timeinfo = localtime(&rawtime); printf("enter: %s", asctime (timeinfo)); printf

Simple tracing in ASP.NET 4

試著忘記壹切 提交于 2019-12-06 10:48:58
问题 I'd like to use the System.Diagnostics.Trace class to perform simple tracing of my application in a text file. The reason I want to use this and not log4net or any other solution, it is because ... it has to be simple :) So, I got this working in C#: TextWriterTraceListener listener = new TextWriterTraceListener(Server.MapPath("~/App_Data/log.txt")); listener.Filter = new EventTypeFilter(SourceLevels.Warning); Trace.Listeners.Add(listener); Or its equivalent in the Web.config: <system

Python's trace module and filepaths

南笙酒味 提交于 2019-12-06 09:51:59
I am using python's trace module to trace the execution of some code. I notice that when the execution is later printed, it is printed in the following form (min working example follows below): <filename>(<line number>): <line of code> Is possible to get the full (either absolute or relative) file path instead of just the file name. It makes sense that there would be a flag somewhere in the call to trace.Trace that should allow me to do this, but I don't seem to be able to find any such parameter in the docs. If such a flag does not exist, how would I go about getting the file path? I guess I

Process execution tracing tools

让人想犯罪 __ 提交于 2019-12-06 09:50:56
问题 I am currently in the process of investigating a very peculiar problem on our lab servers. Whenever we run a java program on a machine with a 64-bit SUSE SLES11 installation that has been accessed with Citrix, it just hangs. I have the latest updates on the machine but it doesn't help. If any of these circumstances change, it works: 32-bit OS, SLES10.2, access via Cygwin/Exceed and other X applications such as xclock work fine. This might look like a ServerFault question so far, but what I'm

Flash builder 4 tracing problem in debug mode

五迷三道 提交于 2019-12-06 09:29:52
I am trying to use trace() in flash builder 4 - but it doesn't work! I am running in "debug", also I added to the flex compiler options the "-debug=true" option. What am I doing wrong ??? In flex 4, a new compiler option is added. -compiler.omit-trace-statements the default value is set to true. this mode omits trace statements for -debug=false mode and enable trace for -debug=true mode automatically. BUT there is a bug in fcsh. If you compile the swf with -debug=true after once compiled it for -debug=true mode, trace statements are still omitted. If you reboot fcsh, the trace is enabled. To