“efc119b43b1e2e296682c20d3a244234eb427405”上不存在“paddle/operators/sequence_softmax_op.cu”
- 26 1月, 2016 22 次提交
-
-
由 Janosch Frank 提交于
Converted class definition to new style and renamed improper named variables. Introduced property for fields_filter. Moved member variable declaration to init, so one can see all class variables when reading the init method. Completely clear the values dict, as we don't need to keep single values. Signed-off-by: NJanosch Frank <frankja@linux.vnet.ibm.com> Message-Id: <1452525484-32309-23-git-send-email-frankja@linux.vnet.ibm.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Janosch Frank 提交于
The variable was only used in one class but still was defined globally. Additionaly the detect_platform routine which prepares the data that goes into the variable was called on each start of the script, no matter if the class was needed. To make the variable local to the TracepointProvider class, a new function that calls detect_platform and returns the filters was introduced. Signed-off-by: NJanosch Frank <frankja@linux.vnet.ibm.com> Message-Id: <1452525484-32309-22-git-send-email-frankja@linux.vnet.ibm.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Janosch Frank 提交于
Reading /sys/devices/system/cpu/online makes opening the cpu directories unnecessary and works on more/older systems. Signed-off-by: NJanosch Frank <frankja@linux.vnet.ibm.com> Message-Id: <1452525484-32309-21-git-send-email-frankja@linux.vnet.ibm.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Janosch Frank 提交于
Variables with bad names like f and m were renamed to their full name, so it is clearer which data they contain. Unneeded variables were removed and the field generating code was moved in an own function. dict.iteritems() was removed as directly iterating over a dictionary also yields the needed keys. Signed-off-by: NJanosch Frank <frankja@linux.vnet.ibm.com> Message-Id: <1452525484-32309-20-git-send-email-frankja@linux.vnet.ibm.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Janosch Frank 提交于
As previous commit authors used a mixture of setters/getters and direct access to class variables consolidating them the python way improved readability. Properties allow us to assign a value to a class variable through a setter without the need to call the setter ourselves. Reviewed-by: NJason J. Herne <jjherne@linux.vnet.ibm.com> Signed-off-by: NJanosch Frank <frankja@linux.vnet.ibm.com> Message-Id: <1452525484-32309-19-git-send-email-frankja@linux.vnet.ibm.com> [prop.setter is new in Python 2.6, which is the earliest supported version. - Paolo] Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Janosch Frank 提交于
The underscore in front of the function name does not comply with the python coding guidelines. Reviewed-by: NJason J. Herne <jjherne@linux.vnet.ibm.com> Signed-off-by: NJanosch Frank <frankja@linux.vnet.ibm.com> Message-Id: <1452525484-32309-18-git-send-email-frankja@linux.vnet.ibm.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Janosch Frank 提交于
The online cpus detection method is in the Stats class but does not use any class variables. Moving it out of the class to the platform detection function makes the Stats class more readable. Signed-off-by: NJanosch Frank <frankja@linux.vnet.ibm.com> Message-Id: <1452525484-32309-17-git-send-email-frankja@linux.vnet.ibm.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Janosch Frank 提交于
s390 machines can also be detected via uname -m, i.e. python's os.uname, no need for more complicated checks. Calling uname once and saving its value for multiple checks is perfectly sufficient. We don't expect the machine's architecture to change when the script is running anyway. On multi-cpu systems x86_init currently will get called multiple times, returning makes sure we don't waste cicles on that. Signed-off-by: NJanosch Frank <frankja@linux.vnet.ibm.com> Message-Id: <1452525484-32309-16-git-send-email-frankja@linux.vnet.ibm.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Janosch Frank 提交于
As num cpus * 1000 is NOT a sensible rlimit, we need to calculate a more accurate rlimit. The number of open files is directly dependent on the cpu count and on the number of trace points per cpu. A additional constant works as a buffer for files that are needed by python or do get opened when the script runs. Hence we have: cpus * traces + constant Reviewed-by: NJason J. Herne <jjherne@linux.vnet.ibm.com> Signed-off-by: NJanosch Frank <frankja@linux.vnet.ibm.com> Message-Id: <1452525484-32309-15-git-send-email-frankja@linux.vnet.ibm.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Janosch Frank 提交于
In 2008 a patch was written that introduced ctypes.get_errno() and set_errno() as official interfaces to the libc errno variable. Using them we can avoid accessing private libc variables. The patch was included in python 2.6. Also we need to raise the right exception, with the right parameters and a helpful message. Signed-off-by: NJanosch Frank <frankja@linux.vnet.ibm.com> Message-Id: <1452525484-32309-14-git-send-email-frankja@linux.vnet.ibm.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Janosch Frank 提交于
When it is next to the TracepointProvider less scrolling is needed to change related, surrounding code. Reviewed-by: NJason J. Herne <jjherne@linux.vnet.ibm.com> Signed-off-by: NJanosch Frank <frankja@linux.vnet.ibm.com> Message-Id: <1452525484-32309-13-git-send-email-frankja@linux.vnet.ibm.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Janosch Frank 提交于
Filter, id and byte are builtin python modules which should not be redefined by local variables. Reviewed-by: NJason J. Herne <jjherne@linux.vnet.ibm.com> Signed-off-by: NJanosch Frank <frankja@linux.vnet.ibm.com> Message-Id: <1452525484-32309-12-git-send-email-frankja@linux.vnet.ibm.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Janosch Frank 提交于
Keyword assignments should not not have spaces around the equal character according to PEP8. Reviewed-by: NJason J. Herne <jjherne@linux.vnet.ibm.com> Signed-off-by: NJanosch Frank <frankja@linux.vnet.ibm.com> Message-Id: <1452525484-32309-11-git-send-email-frankja@linux.vnet.ibm.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Janosch Frank 提交于
The main function should be the main location for initialization and helps encapsulating variables into a scope. This way they don't have to be global and might be mistaken for local ones. As the providers variable is scoped now it can't be accessed from within the Stats class. Hence, the global access to the variable was changed to a local one. Reviewed-by: NJason J. Herne <jjherne@linux.vnet.ibm.com> Signed-off-by: NJanosch Frank <frankja@linux.vnet.ibm.com> Message-Id: <1452525484-32309-10-git-send-email-frankja@linux.vnet.ibm.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Janosch Frank 提交于
Access checking with F_OK was replaced with the better readable os.path.exists(). On Linux exists() returns False when the user doesn't have sufficient permissions for statting the directory. Therefore the error message now states that sufficient rights are needed when the check fails. Also added check for /sys/kernel/debug/tracing/. Signed-off-by: NJanosch Frank <frankja@linux.vnet.ibm.com> Message-Id: <1452525484-32309-9-git-send-email-frankja@linux.vnet.ibm.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Janosch Frank 提交于
Paths to debugfs and trace dirs are now specified globally to remove redundancies in the code. Reviewed-by: NJason J. Herne <jjherne@linux.vnet.ibm.com> Signed-off-by: NJanosch Frank <frankja@linux.vnet.ibm.com> Message-Id: <1452525484-32309-8-git-send-email-frankja@linux.vnet.ibm.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Janosch Frank 提交于
The exit reasons dictionaries were defined number -> value but later on were accessed the other way around. Therefore a invert function inverted them. Defining them the right way removes the need to invert them and therefore also speeds up the script's setup process. Signed-off-by: NJanosch Frank <frankja@linux.vnet.ibm.com> Message-Id: <1452525484-32309-7-git-send-email-frankja@linux.vnet.ibm.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Janosch Frank 提交于
Updating globals over the globals().update() method is not the standard way of changing globals. Marking variables as global and modifying them the standard way is better readable. Signed-off-by: NJanosch Frank <frankja@linux.vnet.ibm.com> Message-Id: <1452525484-32309-6-git-send-email-frankja@linux.vnet.ibm.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Janosch Frank 提交于
Only two of the constants are actually needed to set up the events, so the others were removed. All variables that used them were also removed. Signed-off-by: NJanosch Frank <frankja@linux.vnet.ibm.com> Message-Id: <1452525484-32309-5-git-send-email-frankja@linux.vnet.ibm.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Janosch Frank 提交于
Constants should be uppercase with separating underscores, as requested in PEP8. This helps identifying them when reading the code. Reviewed-by: NJason J. Herne <jjherne@linux.vnet.ibm.com> Signed-off-by: NJanosch Frank <frankja@linux.vnet.ibm.com> Message-Id: <1452525484-32309-4-git-send-email-frankja@linux.vnet.ibm.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Janosch Frank 提交于
Os.walk gives back lists of directories and files, no need to filter directories from the list that listdir gives back. To make it better understandable a wrapper with docstring was introduced. Signed-off-by: NJanosch Frank <frankja@linux.vnet.ibm.com> Message-Id: <1452525484-32309-3-git-send-email-frankja@linux.vnet.ibm.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Janosch Frank 提交于
Removed multiple imports of the same module and moved all imports to the top. It is not necessary to import a module each time one of its functions/classes is used. For readability each import should get its own line. Signed-off-by: NJanosch Frank <frankja@linux.vnet.ibm.com> Message-Id: <1452525484-32309-2-git-send-email-frankja@linux.vnet.ibm.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 10 3月, 2015 1 次提交
-
-
由 Stefan Hajnoczi 提交于
The curses user interface shows both the accumulated total and the current event counts. Add column headers so it's clear what the numbers mean. Signed-off-by: NStefan Hajnoczi <stefanha@redhat.com> Reviewed-by: NAdemar Reis <areis@redhat.com> Reviewed-by: NWei Huang <wei@redhat.com> Message-Id: <1425338947-10296-2-git-send-email-stefanha@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 12 2月, 2015 1 次提交
-
-
由 Wei Huang 提交于
This patch defines the list of kvm_exit reasons for aarch64. This list is based on the Exception Class (EC) field of HSR register. With this patch users can trace the execution of guest VMs better. A sample output from command "kvm_stat -1 -t" is shown as the following: <...> kvm_exit(WATCHPT_HYP) 0 0 kvm_exit(WFI) 9422 9361 NOTE: This patch requires TRACE_EVENT(kvm_exit) to include exit_reason field in TP_ARGS. A patch to upstream kernel has been submitted. Signed-off-by: NWei Huang <wei@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 26 1月, 2015 4 次提交
-
-
由 Wei Huang 提交于
While running kvm_stat using tracepoint on ARM64 hardware (e.g. "kvm_stat -1 -t"), the initial values of some kvm_userspace_exit counters were found to be very suspecious. For instance the tracing tool showed that S390_TSCH was called many times on ARM64 machine, which apparently was wrong. This patch adds RESET ioctl support for perf monitoring. Before calling ioctl to enable a perf event, this patch resets the counter first. With this patch, the init counter values become correct on ARM64 hardware. Example: ==== before patch ==== kvm_userspace_exit(S390_SIEIC) 1426 0 kvm_userspace_exit(S390_TSCH) 339 0 ==== after patch ==== kvm_userspace_exit(S390_SIEIC) 0 0 kvm_userspace_exit(S390_TSCH) 0 0 Signed-off-by: NWei Huang <wei@redhat.com>
-
由 Wei Huang 提交于
kvm_stat uses syscall() to call perf_event_open(). If this function call fails, the returned value is -1, which doesn't tell the details of such failure (i.e. ENOSYS or EINVAL). This patch retrieves errno and prints it when syscall() fails. The error message will look like "Exception: perf_event_open failed, errno = 38". Signed-off-by: NWei Huang <wei@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Wei Huang 提交于
This patch updates the exit reasons for x86_vmx, x86_svm, and userspace to the latest definition. Signed-off-by: NWei Huang <wei@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Wei Huang 提交于
This patch enables aarch64 support for kvm_stat. The platform detection is based on OS uname. Signed-off-by: NWei Huang <wei@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 31 10月, 2014 5 次提交
-
-
由 Michael Ellerman 提交于
Add support for powerpc platforms. We use uname -m, which allows us to detect ppc, ppc64 and ppc64le/el. Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Michael Ellerman 提交于
Unfortunately ioctl numbers are platform specific, so abstract them out of the code so they can be overridden. As it happens x86 and s390 share the same values, so nothing needs to change yet. Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Michael Ellerman 提交于
The current platform detection is a little bit messy. We look for lines in /proc/cpuinfo starting with 'flags' OR 'vendor-id', and scan both for values we know will only occur in one or the other. We also keep scanning once we've found a value, which could be a feature, but isn't in this case. We'd also like to add another platform, powerpc, which will just make it worse. So clean it up in preparation. Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Michael Ellerman 提交于
In kvm_stat we have a dictionary of exit reasons for s390. Firstly these are not s390 specific, they are the generic exit reasons. So rename the dictionary to reflect that, and add it separately to filters[]. Secondly, the values are defined using hex, but in the kernel header they are decimal. That means values above 9 in kvm_stat are incorrect. While we're there, fix the whitespace to match the rest of the file. Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Michael Ellerman 提交于
In kvm_stat we grovel through /sys to find out how many cpus are in the system. However if a cpu is offline it will still be present in /sys, and the perf_event_open() will fail. Modify the logic to only return online cpus. We need to be careful on systems which don't support cpu hotplug, the online file will not be present at all. Signed-off-by: NMichael Ellerman <mpe@ellerman.id.au> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 21 5月, 2014 1 次提交
-
-
由 Paolo Bonzini 提交于
The old stats contain information not available in the tracepoints. By default, keep the old behavior, but allow choosing which set of stats to present, or even both. Inspired by a patch from Marcelo Tosatti. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 30 10月, 2012 1 次提交
-
-
由 Heinz Graalfs 提交于
Correct sys_perf_event_open syscall number for s390 architecture - the hardcoded syscall number 298 is for x86 but should be different for other architectures. In case we figure out via /proc/cpuinfo that we are running on s390 the appropriate syscall number is used from map syscall_numbers; other architectures can extend this. Signed-off-by: NHeinz Graalfs <graalfs@linux.vnet.ibm.com> Signed-off-by: NJens Freimann <jfrei@linux.vnet.ibm.com> Signed-off-by: NAlexander Graf <agraf@suse.de>
-
- 18 6月, 2012 1 次提交
-
-
由 Jens Freimann 提交于
Add s390_exit_reasons so kvm_stat doesn't crash when called on s390. Look for 'vendor_id' in /proc/cpuinfo as well, instead of just for 'flags', so we can determine if we run on S390. Signed-off-by: NJens Freimann <jfrei@linux.vnet.ibm.com> Signed-off-by: NAlexander Graf <agraf@suse.de>
-
- 25 10月, 2011 1 次提交
-
-
由 Jan Kiszka 提交于
Taken from original qemu-kvm/kvm/kvm_stat. Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Signed-off-by: NAvi Kivity <avi@redhat.com>
-