Commit 080e47b
perf probe: Introduce quotation marks support
In non-C languages, it is possible to have ':' in the function names.
It is possible to escape it with backslashes, but if there are too many
backslashes, it is annoying.
This introduce quotation marks (`"` or `'`) support.
For example, without quotes, we have to pass it as below
$ perf probe -x cro3 -L "cro3\:\:cmd\:\:servo\:\:run_show"
<run_show@/work/cro3/src/cmd/servo.rs:0>
0 fn run_show(args: &ArgsShow) -> Result<()> {
1 let list = ServoList::discover()?;
2 let s = list.find_by_serial(&args.servo)?;
3 if args.json {
4 println!("{s}");
With quotes, we can more naturally write the function name as below;
$ perf probe -x cro3 -L \"cro3::cmd::servo::run_show\"
<run_show@/work/cro3/src/cmd/servo.rs:0>
0 fn run_show(args: &ArgsShow) -> Result<()> {
1 let list = ServoList::discover()?;
2 let s = list.find_by_serial(&args.servo)?;
3 if args.json {
4 println!("{s}");
Signed-off-by: Masami Hiramatsu <mhiramat@kernel.org>
Cc: Alexander Lobakin <aleksander.lobakin@intel.com>
Cc: Dima Kogan <dima@secretsauce.net>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Link: https://lore.kernel.org/r/173099116941.2431889.11609129616090100386.stgit@mhiramat.roam.corp.google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>1 parent 313026f commit 080e47b
1 file changed
+41
-34
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1079 | 1079 | | |
1080 | 1080 | | |
1081 | 1081 | | |
| 1082 | + | |
1082 | 1083 | | |
1083 | 1084 | | |
1084 | 1085 | | |
| |||
1362 | 1363 | | |
1363 | 1364 | | |
1364 | 1365 | | |
| 1366 | + | |
1365 | 1367 | | |
1366 | 1368 | | |
1367 | 1369 | | |
1368 | | - | |
| 1370 | + | |
| 1371 | + | |
1369 | 1372 | | |
1370 | 1373 | | |
1371 | | - | |
| 1374 | + | |
1372 | 1375 | | |
1373 | 1376 | | |
1374 | 1377 | | |
1375 | 1378 | | |
1376 | 1379 | | |
1377 | | - | |
1378 | | - | |
1379 | | - | |
| 1380 | + | |
| 1381 | + | |
| 1382 | + | |
| 1383 | + | |
| 1384 | + | |
| 1385 | + | |
| 1386 | + | |
| 1387 | + | |
1380 | 1388 | | |
1381 | | - | |
| 1389 | + | |
1382 | 1390 | | |
1383 | 1391 | | |
1384 | 1392 | | |
1385 | | - | |
1386 | | - | |
| 1393 | + | |
| 1394 | + | |
1387 | 1395 | | |
1388 | | - | |
| 1396 | + | |
1389 | 1397 | | |
1390 | 1398 | | |
1391 | 1399 | | |
| |||
1409 | 1417 | | |
1410 | 1418 | | |
1411 | 1419 | | |
1412 | | - | |
1413 | | - | |
| 1420 | + | |
| 1421 | + | |
1414 | 1422 | | |
1415 | 1423 | | |
1416 | 1424 | | |
1417 | 1425 | | |
1418 | | - | |
1419 | | - | |
1420 | | - | |
1421 | | - | |
1422 | | - | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
1423 | 1431 | | |
1424 | 1432 | | |
1425 | 1433 | | |
1426 | 1434 | | |
1427 | 1435 | | |
1428 | | - | |
1429 | | - | |
| 1436 | + | |
| 1437 | + | |
1430 | 1438 | | |
1431 | 1439 | | |
1432 | 1440 | | |
1433 | 1441 | | |
1434 | 1442 | | |
1435 | | - | |
1436 | | - | |
1437 | | - | |
1438 | | - | |
| 1443 | + | |
| 1444 | + | |
| 1445 | + | |
| 1446 | + | |
1439 | 1447 | | |
1440 | | - | |
| 1448 | + | |
1441 | 1449 | | |
1442 | 1450 | | |
1443 | 1451 | | |
1444 | 1452 | | |
1445 | | - | |
1446 | 1453 | | |
1447 | | - | |
| 1454 | + | |
1448 | 1455 | | |
1449 | 1456 | | |
1450 | 1457 | | |
1451 | 1458 | | |
1452 | 1459 | | |
1453 | 1460 | | |
1454 | 1461 | | |
1455 | | - | |
| 1462 | + | |
1456 | 1463 | | |
1457 | 1464 | | |
1458 | 1465 | | |
1459 | 1466 | | |
1460 | | - | |
| 1467 | + | |
1461 | 1468 | | |
1462 | 1469 | | |
1463 | 1470 | | |
1464 | 1471 | | |
1465 | 1472 | | |
1466 | 1473 | | |
1467 | | - | |
| 1474 | + | |
1468 | 1475 | | |
1469 | 1476 | | |
1470 | 1477 | | |
| |||
1503 | 1510 | | |
1504 | 1511 | | |
1505 | 1512 | | |
1506 | | - | |
| 1513 | + | |
1507 | 1514 | | |
1508 | 1515 | | |
1509 | 1516 | | |
| |||
1517 | 1524 | | |
1518 | 1525 | | |
1519 | 1526 | | |
1520 | | - | |
| 1527 | + | |
1521 | 1528 | | |
1522 | 1529 | | |
1523 | 1530 | | |
| |||
1558 | 1565 | | |
1559 | 1566 | | |
1560 | 1567 | | |
1561 | | - | |
| 1568 | + | |
1562 | 1569 | | |
1563 | 1570 | | |
1564 | 1571 | | |
| |||
1567 | 1574 | | |
1568 | 1575 | | |
1569 | 1576 | | |
1570 | | - | |
| 1577 | + | |
1571 | 1578 | | |
1572 | 1579 | | |
1573 | 1580 | | |
| |||
1605 | 1612 | | |
1606 | 1613 | | |
1607 | 1614 | | |
1608 | | - | |
| 1615 | + | |
1609 | 1616 | | |
1610 | 1617 | | |
1611 | 1618 | | |
| |||
1634 | 1641 | | |
1635 | 1642 | | |
1636 | 1643 | | |
1637 | | - | |
| 1644 | + | |
1638 | 1645 | | |
1639 | 1646 | | |
1640 | 1647 | | |
| |||
0 commit comments