Skip to content

Instantly share code, notes, and snippets.

Testing of Xen vPMU filter options.

Three tests are executed on a simple program (noploop, which runs NOP in a loop). The first two show Linux "perf stat" summaries, and the third tests specific counters: the IPC ones, an architectural one, and a few extras. Which of these will work depends on the filter mode.

I'll begin by showing off and on, the current modes, and then the new modes: ipc and arch.

vpmu=off (default)

root@lgud-bgregg:~> xl dmesg | grep vpmu

原文

新老用户都可能遇到陷阱。下面我们列出频繁出现的问题,以及如何解决。 在 Freenode IRC #nginx 频道,我们经常看到这些问题。

[TOC]

关于本指南

最常见的是有人试图从其他指南拷贝配置片段。并非所有的指南是错误的,但绝大部分是有问题的。

@styxyang
styxyang / string_copy.c
Created September 21, 2021 16:32
secure string copy test
#include <stdio.h>
#include <string.h>
#include <securec.h>
#define HELLOWORLD "helloworld"
#define HELLOWORLD1 "helloworld1"
int main()
{
char name[sizeof(HELLOWORLD)] = HELLOWORLD;
char name1[sizeof(HELLOWORLD1)] = HELLOWORLD1;